Masigaderic
On this page, you find all documents, package deals, and flashcards offered by seller masigaderic.
- 665
- 0
- 13
Community
- Followers
- Following
517 Reviews received
678 items
Python Exam Study Quizzes with Verified solutions
What type of variable is the 'x' in the following code? 
x='15' - String 
While performing the Echo Communication home project, the command t() crashed the 
script. 
What could be the problem? - The accept() command was not assigned with two variables. 
When accepting data in client-server communication, what is the meaning of recv(2048)? - The limit 
for the amount of bytes to accept. 
Which of the following is NOT a Python data structure? - Switch 
Which of the following operators in Pyt...
- Exam (elaborations)
- • 3 pages •
What type of variable is the 'x' in the following code? 
x='15' - String 
While performing the Echo Communication home project, the command t() crashed the 
script. 
What could be the problem? - The accept() command was not assigned with two variables. 
When accepting data in client-server communication, what is the meaning of recv(2048)? - The limit 
for the amount of bytes to accept. 
Which of the following is NOT a Python data structure? - Switch 
Which of the following operators in Pyt...
Python Exam Review Questions with merged Solutions
Given the following string: S = "Welcome: which code results in an error? - Print(S+1) 
 What is the output of the following code? 
name = 123 
if swith("a") 
print("welcome") - An error message 
 Which statements evaluate True and without errors? (Choose all that apply.) - "The 
Title".istitle() 
"upper".islower() 
 What is the order of precedence (from first to last) of the math operators? - *, /, +, - 
 What is the output of the following code? 
print("She said, "Who's there?...
- Exam (elaborations)
- • 5 pages •
Given the following string: S = "Welcome: which code results in an error? - Print(S+1) 
 What is the output of the following code? 
name = 123 
if swith("a") 
print("welcome") - An error message 
 Which statements evaluate True and without errors? (Choose all that apply.) - "The 
Title".istitle() 
"upper".islower() 
 What is the order of precedence (from first to last) of the math operators? - *, /, +, - 
 What is the output of the following code? 
print("She said, "Who's there?...
Python Exam Review Questions and Answers for latest updates
What is printed by the following program? 
my_total = 0 
do_not_stop = True 
while do_not_stop == True: 
my_total += 5 if my_total > 10: 
do_not_stop = False 
print(my_total) 
0 
Nothing, the program does not stop running. It contains an infinite loop. 
10 
15 - 15 
The index of the first element in a Python list is ____________. 
2 
There is insufficient information to answer the question. 
1 
0 - 0 
The while keyword takes a condition just like which other keyword? 
else 
if 
None of thes...
- Exam (elaborations)
- • 6 pages •
What is printed by the following program? 
my_total = 0 
do_not_stop = True 
while do_not_stop == True: 
my_total += 5 if my_total > 10: 
do_not_stop = False 
print(my_total) 
0 
Nothing, the program does not stop running. It contains an infinite loop. 
10 
15 - 15 
The index of the first element in a Python list is ____________. 
2 
There is insufficient information to answer the question. 
1 
0 - 0 
The while keyword takes a condition just like which other keyword? 
else 
if 
None of thes...
Python exam review questions and answers 2024
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] return? - [0,0,0] 
if you really want to copy a list, what can you do? - list2 = list1[:] 
difference between append and extend? - append adds whole argument as single element, while 
extend adds each item of argument as el...
- Exam (elaborations)
- • 13 pages •
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] return? - [0,0,0] 
if you really want to copy a list, what can you do? - list2 = list1[:] 
difference between append and extend? - append adds whole argument as single element, while 
extend adds each item of argument as el...
Python Exam Questions, PART 1 : 65 Questions with Complete Solutions 2024
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 = 'Hello World!'? - Hello World! 
4. What is the output of print(str[0]) if str = 'Hello World!'? - H 
5. What is the output of print(str[2:5]) if str = 'Hello World!'? - llo 
6. What is the output of p...
- Exam (elaborations)
- • 5 pages •
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 = 'Hello World!'? - Hello World! 
4. What is the output of print(str[0]) if str = 'Hello World!'? - H 
5. What is the output of print(str[2:5]) if str = 'Hello World!'? - llo 
6. What is the output of p...
ython Exam one Quick Questions with Complete solutions
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 is the output of: 21%2 - 1 
What is the output of: 11%3 - 2 
x = 'Texas A&M University' 
x [-3] = ? - i 
x = 'Texas A&M University' 
x [3] = ? - a 
x = 'Texas A&M University' 
len(x) = ? - 20 
x = 'Texas A&M Unive...
- Exam (elaborations)
- • 22 pages •
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 is the output of: 21%2 - 1 
What is the output of: 11%3 - 2 
x = 'Texas A&M University' 
x [-3] = ? - i 
x = 'Texas A&M University' 
x [3] = ? - a 
x = 'Texas A&M University' 
len(x) = ? - 20 
x = 'Texas A&M Unive...
Python Exam functions Questions with complete Solutions
Functions - ## A function is a sequence of instructions with a name. 
## When a function is called, the instructions are executed. 
## When the execution of the instructions is complete, the function may return a value to the calling 
program. 
Function round - price = round(6.8275, 2) 
## The function round is called with arguments 6.8275 
## and 2. 
## round returns the number 6.83, which becomes the 
## value of price. 
## The computations within round are hidden from the 
## calling program...
- Exam (elaborations)
- • 3 pages •
Functions - ## A function is a sequence of instructions with a name. 
## When a function is called, the instructions are executed. 
## When the execution of the instructions is complete, the function may return a value to the calling 
program. 
Function round - price = round(6.8275, 2) 
## The function round is called with arguments 6.8275 
## and 2. 
## round returns the number 6.83, which becomes the 
## value of price. 
## The computations within round are hidden from the 
## calling program...
Python Exam Chapters 1-5 Questions with Answers merged
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'. Strings always start and end with quotes. 
Name three data types. - The three data types are integers, floating point numbers, and strings. 
What is an expression made up of ? What do all expressions do ? -...
- Exam (elaborations)
- • 13 pages •
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'. Strings always start and end with quotes. 
Name three data types. - The three data types are integers, floating point numbers, and strings. 
What is an expression made up of ? What do all expressions do ? -...
Python Exam Challenge Questions with merged Solution 2024
1. 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 constructions than other languages. 
d. All of the above - d. All of the above. 
2. Is Python case sensitive when dealing with identifiers? 
a. yes 
b. no 
c. it depends on context 
d. it depends...
- Exam (elaborations)
- • 6 pages •
1. 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 constructions than other languages. 
d. All of the above - d. All of the above. 
2. Is Python case sensitive when dealing with identifiers? 
a. yes 
b. no 
c. it depends on context 
d. it depends...
Python Exam 3 Review Questions and Answers
This term refers to an individual item in a list - Element 
This is a number that identifies an item in a list - index 
This is the first index in a list - 0 
This is the last index in a list - The size of the list minus one 
This will happen if you try to use an index that is out of range for a list - an IndexError will occur 
This function returns the length of a list - len 
When the * operator's left operand is a list and its right oberand is an integer, the operator becoms this - 
the repet...
- Exam (elaborations)
- • 4 pages •
This term refers to an individual item in a list - Element 
This is a number that identifies an item in a list - index 
This is the first index in a list - 0 
This is the last index in a list - The size of the list minus one 
This will happen if you try to use an index that is out of range for a list - an IndexError will occur 
This function returns the length of a list - len 
When the * operator's left operand is a list and its right oberand is an integer, the operator becoms this - 
the repet...
OCR 2023 Biology A H020/01: Breadth in biology OCR 2023Biology AH020/01: Breadth in biology AS Level Question Paper & Mark Scheme (Merged)AS Level Question Paper & Mark Scheme (Merged)
OCR 2023 Biology A H020/02: Depth in biology AS Level Question Paper & Mark Scheme (Merged)
OCR 2023 GCE ENGLISH LITERATURE H472/01: DRAMA AND POETRY PRE-1900 A LEVEL QUESTION PAPER & MARK SCHEME (MERGED
OCR 2023 COMPUTER SCIENCE H046/01: COMPUTING PRINCIPLES AS LEVEL QUESTION PAPER & MARK SCHEME (MERGED
OCR 2023 GCSE Religious Studies J625/07: Religion, philosophy and ethics in the modern world from a Muslim perspective Question Paper & Mark Scheme (Merged)