Package deal
PYTHON BUNDLED exams 2023 with 100% correct answers
PYTHON exam 2023 with 100% correct answers Python Final Exam 2023 with 100% correct answers
[Show more]PYTHON exam 2023 with 100% correct answers Python Final Exam 2023 with 100% correct answers
[Show more]how do we add a list to a list? 
list[2] = [1, 2, 3] 
 
 
 
how do we ad elements of a list to a list? 
list[2:2] = [1,2,3] 
 
 
 
how do we delete elements from a list? 
del list[1] 
 
 
 
what's another way of deleting elements from a list, besides del? 
list[1] = [] 
 
 
 
what does 3 * [0] retu...
Preview 2 out of 13 pages
Add to carthow do we add a list to a list? 
list[2] = [1, 2, 3] 
 
 
 
how do we ad elements of a list to a list? 
list[2:2] = [1,2,3] 
 
 
 
how do we delete elements from a list? 
del list[1] 
 
 
 
what's another way of deleting elements from a list, besides del? 
list[1] = [] 
 
 
 
what does 3 * [0] retu...
1. Which of the following data types are supported in Python? 
The following data type are Supported: 
1 - Numbers 
2 - String 
3 - List 
4 - Tuples 
5 - Dictionary 
 
 
 
2. Which of the following data types are not supported in Python? 
Slice 
 
 
 
3. What is the output of print(str) if str = 'H...
Preview 2 out of 5 pages
Add to cart1. Which of the following data types are supported in Python? 
The following data type are Supported: 
1 - Numbers 
2 - String 
3 - List 
4 - Tuples 
5 - Dictionary 
 
 
 
2. Which of the following data types are not supported in Python? 
Slice 
 
 
 
3. What is the output of print(str) if str = 'H...
Which of the following are operators, and which are values? 
* 
'hello' 
-88.8 
- 
/ 
+ 
5 
The operators are +,-,*,and /. The values are 'hello' ,-88.8, and 5. 
 
 
 
Which of the following is a variable , and which is a string ? 
spam 
'spam' 
The variable is spam; the string is 'spam'. St...
Preview 2 out of 13 pages
Add to cartWhich of the following are operators, and which are values? 
* 
'hello' 
-88.8 
- 
/ 
+ 
5 
The operators are +,-,*,and /. The values are 'hello' ,-88.8, and 5. 
 
 
 
Which of the following is a variable , and which is a string ? 
spam 
'spam' 
The variable is spam; the string is 'spam'. St...
The following code represents a ________________ if structure. 
 
if a >= 1: 
if a == 1: 
nested 
 
 
 
Which line of code sets the value of the variable take_home to 500? 
take_home == 1500 / (1 + 2) 
take_home = 250 * 6 / 1 + 2 
take_home = 250 * (5 % 3) 
take_home = 250 * 5 - 3 
take_home = 25...
Preview 2 out of 13 pages
Add to cartThe following code represents a ________________ if structure. 
 
if a >= 1: 
if a == 1: 
nested 
 
 
 
Which line of code sets the value of the variable take_home to 500? 
take_home == 1500 / (1 + 2) 
take_home = 250 * 6 / 1 + 2 
take_home = 250 * (5 % 3) 
take_home = 250 * 5 - 3 
take_home = 25...
What is the output of: 11.0//2 
5.0 
Floor division to the nearest whole number 
Returns a float 
 
 
 
What is the output of: 11//2 
5 
Return an int 
 
 
 
What is the output of: 11/2 
5.5 
Returns a float 
 
 
 
What is the output of: 11/2.0 
5.0 
 
 
 
What is the output of: 20%2 
0 
 
 
 
What ...
Preview 3 out of 22 pages
Add to cartWhat is the output of: 11.0//2 
5.0 
Floor division to the nearest whole number 
Returns a float 
 
 
 
What is the output of: 11//2 
5 
Return an int 
 
 
 
What is the output of: 11/2 
5.5 
Returns a float 
 
 
 
What is the output of: 11/2.0 
5.0 
 
 
 
What is the output of: 20%2 
0 
 
 
 
What ...
*A ____ is a set of instructions that a computer follows to perform a task 
Program 
 
 
 
The physical devices that a computer is made of are referred to as ______ 
Hardware 
 
 
 
*The part of a program that runs the programs is called the ____ 
CPU 
 
 
 
Today, CPU's are small chips known as __...
Preview 2 out of 11 pages
Add to cart*A ____ is a set of instructions that a computer follows to perform a task 
Program 
 
 
 
The physical devices that a computer is made of are referred to as ______ 
Hardware 
 
 
 
*The part of a program that runs the programs is called the ____ 
CPU 
 
 
 
Today, CPU's are small chips known as __...
A(n) __________ program translates a high-level language program into a separate machine language program. 
 
translator 
assembler 
compiler 
utility 
compiler 
 
 
 
The rules that must be followed when writing a program are called __________. 
 
operators 
punctuation 
syntax 
key words 
syntax 
...
Preview 3 out of 28 pages
Add to cartA(n) __________ program translates a high-level language program into a separate machine language program. 
 
translator 
assembler 
compiler 
utility 
compiler 
 
 
 
The rules that must be followed when writing a program are called __________. 
 
operators 
punctuation 
syntax 
key words 
syntax 
...
algorithm 
A set of specific steps for solving a category of problems 
 
 
 
comment 
Text in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program 
 
 
 
high-level language 
A programming language like Python that is des...
Preview 2 out of 6 pages
Add to cartalgorithm 
A set of specific steps for solving a category of problems 
 
 
 
comment 
Text in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program 
 
 
 
high-level language 
A programming language like Python that is des...
Which of the following is correct about Python? 
 
a. Python is a high-level, interpreted, interactive and object-oriented scripting language. 
b. Python is designed to be highly readable. 
c. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical ...
Preview 2 out of 7 pages
Add to cartWhich of the following is correct about Python? 
 
a. Python is a high-level, interpreted, interactive and object-oriented scripting language. 
b. Python is designed to be highly readable. 
c. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical ...
The physical computer and peripheral devices are collectively called the _____. 
hardware 
 
 
 
iting the program for a computer game with motion, graphics, and sound effects usually requires _____ 
a team of highly skilled programmers writing a large number of simple instructions 
 
 
 
What is re...
Preview 2 out of 7 pages
Add to cartThe physical computer and peripheral devices are collectively called the _____. 
hardware 
 
 
 
iting the program for a computer game with motion, graphics, and sound effects usually requires _____ 
a team of highly skilled programmers writing a large number of simple instructions 
 
 
 
What is re...
An exception handler is a piece of code that is written using the try/except statement: T/F 
True 
 
 
 
If a file with the specified name already exists when the file is opened and the file is opened in 'w' mode, then an alert will appear on the screen: T/F 
False 
 
 
 
If the last line in a fil...
Preview 2 out of 6 pages
Add to cartAn exception handler is a piece of code that is written using the try/except statement: T/F 
True 
 
 
 
If a file with the specified name already exists when the file is opened and the file is opened in 'w' mode, then an alert will appear on the screen: T/F 
False 
 
 
 
If the last line in a fil...
Which of the following statements is true about comments in coding? 
Comments are a form of communication with other programmers (including yourself) 
 
 
 
In the following line of Python code, what is the argument to the input function? 
user_status = input("How are you today?") 
"How are you t...
Preview 2 out of 6 pages
Add to cartWhich of the following statements is true about comments in coding? 
Comments are a form of communication with other programmers (including yourself) 
 
 
 
In the following line of Python code, what is the argument to the input function? 
user_status = input("How are you today?") 
"How are you t...
What type of volatile memory is usually used only for temporary storage while running a program? 
RAM 
 
 
 
Where does a computer store a program and the data that the program is working with while the program is running? 
in main memory 
 
 
 
What is the largest value that can be stored in one by...
Preview 1 out of 4 pages
Add to cartWhat type of volatile memory is usually used only for temporary storage while running a program? 
RAM 
 
 
 
Where does a computer store a program and the data that the program is working with while the program is running? 
in main memory 
 
 
 
What is the largest value that can be stored in one by...
If variable x has the value 3.99, which of the following will set variable y equal to 3? (Assume the math library has been imported.) 
1) y = trunc(x) 
2) y = round(x - 1) 
3) y = floor(x) 
 
 
 
Which of the following can be used to assign 2 percent to variable discount? 
None of these answers 
 
 ...
Preview 1 out of 4 pages
Add to cartIf variable x has the value 3.99, which of the following will set variable y equal to 3? (Assume the math library has been imported.) 
1) y = trunc(x) 
2) y = round(x - 1) 
3) y = floor(x) 
 
 
 
Which of the following can be used to assign 2 percent to variable discount? 
None of these answers 
 
 ...
Code 
set on instructions you can give to a computer to make it perform a desired task 
 
 
 
program 
complete piece of code that can be run for a desired purpose 
 
 
 
algorithm 
sequence of defined, computer-implementable instructions to perform a calculation or solve a problem 
 
 
 
input 
ret...
Preview 2 out of 5 pages
Add to cartCode 
set on instructions you can give to a computer to make it perform a desired task 
 
 
 
program 
complete piece of code that can be run for a desired purpose 
 
 
 
algorithm 
sequence of defined, computer-implementable instructions to perform a calculation or solve a problem 
 
 
 
input 
ret...
Output file 
a file that data is written to 
 
 
 
Input file 
a file that data is read from 
 
 
 
Three steps when a program uses a file 
Open the file 
Process the file 
Close the file 
 
 
 
Text file 
contains data that has been encoded as text 
 
 
 
Binary file 
contains data that has not bee...
Preview 3 out of 17 pages
Add to cartOutput file 
a file that data is written to 
 
 
 
Input file 
a file that data is read from 
 
 
 
Three steps when a program uses a file 
Open the file 
Process the file 
Close the file 
 
 
 
Text file 
contains data that has been encoded as text 
 
 
 
Binary file 
contains data that has not bee...
Which of the following functions does not belong to the random function 
pi 
 
 
 
The _________ of a variable refers to the program parts where the variable can be accessed 
Scope 
 
 
 
A statement in one function can access a local variable in another function. 
False 
 
 
 
The _________ keycard...
Preview 2 out of 5 pages
Add to cartWhich of the following functions does not belong to the random function 
pi 
 
 
 
The _________ of a variable refers to the program parts where the variable can be accessed 
Scope 
 
 
 
A statement in one function can access a local variable in another function. 
False 
 
 
 
The _________ keycard...
Where does a computer store a program and the data that the program is working with while the program is running? 
Main memory 
 
 
 
What is the encoding technique used to store positive and negative integers in the computer's memory? 
Two's-complement 
 
 
 
How many different values can a singl...
Preview 2 out of 5 pages
Add to cartWhere does a computer store a program and the data that the program is working with while the program is running? 
Main memory 
 
 
 
What is the encoding technique used to store positive and negative integers in the computer's memory? 
Two's-complement 
 
 
 
How many different values can a singl...
Functions 
group of statements that exist within a program for the purpose of performing a specific task 
 
 
 
Divide and conquer 
Instead of writing 1 large program, break it down into individual tasks. 
individuals or teams can works independently on separate tasks. 
 
 
 
Advantages of divide an...
Preview 2 out of 6 pages
Add to cartFunctions 
group of statements that exist within a program for the purpose of performing a specific task 
 
 
 
Divide and conquer 
Instead of writing 1 large program, break it down into individual tasks. 
individuals or teams can works independently on separate tasks. 
 
 
 
Advantages of divide an...
Which of the following is the correct extension of the Python file? 
.py 
 
 
 
Does python code need to be compiled or interpreted? 
Python code is both compiled and interpreted 
 
 
 
Which of the following is used to define a block of code in Python language? 
Indentation 
 
 
 
Which keyword is ...
Preview 2 out of 14 pages
Add to cartWhich of the following is the correct extension of the Python file? 
.py 
 
 
 
Does python code need to be compiled or interpreted? 
Python code is both compiled and interpreted 
 
 
 
Which of the following is used to define a block of code in Python language? 
Indentation 
 
 
 
Which keyword is ...
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Stuvia is a marketplace, so you are not buying this document from us, but from seller JUICYGRADES. Stuvia facilitates payment to the seller.
No, you only buy these notes for $50.49. You're not tied to anything after your purchase.
4.6 stars on Google & Trustpilot (+1000 reviews)
83637 documents were sold in the last 30 days
Founded in 2010, the go-to place to buy study notes for 14 years now