Masigaderic
On this page, you find all documents, package deals, and flashcards offered by seller masigaderic.
- 513
- 0
- 18
Community
- Followers
- Following
520 Reviews received
531 items
Python Programming Final Exam Review Questions with Complete solutions
The primary difference between a tuple and a list is that - once a tuple is created, it cannot be 
changed 
What will be the value of the variable list2 after the following code executes? 
list1 = [1, 2, 3] 
list2 = [] 
for element in list1: 
d(element) 
list1 = [4, 5, 6] - [1, 2, 3] 
What will be the value of the variable list after the following code executes? 
list = [1, 2, 3, 4] 
list[3] = 10 - [1, 2, 3, 10] 
What is an advantage of using a tuple rather than a list? - Processing a tuple is ...
- Exam (elaborations)
- • 5 pages •
The primary difference between a tuple and a list is that - once a tuple is created, it cannot be 
changed 
What will be the value of the variable list2 after the following code executes? 
list1 = [1, 2, 3] 
list2 = [] 
for element in list1: 
d(element) 
list1 = [4, 5, 6] - [1, 2, 3] 
What will be the value of the variable list after the following code executes? 
list = [1, 2, 3, 4] 
list[3] = 10 - [1, 2, 3, 10] 
What is an advantage of using a tuple rather than a list? - Processing a tuple is ...
Python Programming Exam Review Questions with Complete Solutions
forward(distance) - moves turtle forward distance in current direction 
 backward(distance) - moves turtle backward in current direction 
 circle(radius) - moves the turtle in a circle. Within the parentheses, you write the radius of 
the circle. 
 penUp, penDown - controls whether or not Tracy is leaving a trail. 
 What are the dimensions of Tracy's world? - 400 pixel tall x 400 pixels wide 
 left(angle), right(angle) - turns Tracy either left or right the inputted degrees 
 For loops - used...
- Exam (elaborations)
- • 8 pages •
forward(distance) - moves turtle forward distance in current direction 
 backward(distance) - moves turtle backward in current direction 
 circle(radius) - moves the turtle in a circle. Within the parentheses, you write the radius of 
the circle. 
 penUp, penDown - controls whether or not Tracy is leaving a trail. 
 What are the dimensions of Tracy's world? - 400 pixel tall x 400 pixels wide 
 left(angle), right(angle) - turns Tracy either left or right the inputted degrees 
 For loops - used...
Python Practice Exam Questions with complete Solutions 2024
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 file is not terminated with n, the readline method will return the line without 
n: T/F - True 
 When a piece of data is read from a file, it is copied from the file into the program: T/F - False 
 Which mode specifier will erase the contents of a file if it already exists and create the file if i...
- Exam (elaborations)
- • 6 pages •
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 file is not terminated with n, the readline method will return the line without 
n: T/F - True 
 When a piece of data is read from a file, it is copied from the file into the program: T/F - False 
 Which mode specifier will erase the contents of a file if it already exists and create the file if i...
Python Mocking Exam Questions with merged Answers
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 Mock Exam Questions with merged Answers
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 today?" 
Which symbol is used to assign a value to a variable in Python? - = 
Which of the following is not a valid variable name in Python? - my_2_cents 
In Python, whole numbers like -3, 5 or 11 are s...
- Exam (elaborations)
- • 6 pages •
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 today?" 
Which symbol is used to assign a value to a variable in Python? - = 
Which of the following is not a valid variable name in Python? - my_2_cents 
In Python, whole numbers like -3, 5 or 11 are s...
Python MIS Exam Questions and detailed Answers 2024
Booleans can only be 
-true false 
-numbers 
-letters - True and False 
What symbol would you use to see if two things are equal to each other? 
> 
== 
= 
!= - == 
What letter do we put in front of a String if we want to put variables in it? 
-f 
-s 
-j 
-x - f 
Which of the following is an Int? 
-hello 
-43 
-43.3 - 43 
it is a whole number 
Which of the following is not a string? 
-'Hello' 
-43 
-"Hello" - 43 
It has no quotes around it 
To use the Random module, what must we include a...
- Exam (elaborations)
- • 4 pages •
Booleans can only be 
-true false 
-numbers 
-letters - True and False 
What symbol would you use to see if two things are equal to each other? 
> 
== 
= 
!= - == 
What letter do we put in front of a String if we want to put variables in it? 
-f 
-s 
-j 
-x - f 
Which of the following is an Int? 
-hello 
-43 
-43.3 - 43 
it is a whole number 
Which of the following is not a string? 
-'Hello' 
-43 
-"Hello" - 43 
It has no quotes around it 
To use the Random module, what must we include a...
Python Mid-Term Exam Study Questions and Answers
False - True or False: Computer science is the study of computers 
CPU - The "brain" of the computer is the 
RAM (Random Access Memory) - Main memory is also called 
main memory - All information that a computer is currently working on is stored in 
Syntax - _______ of a language is its form 
Semantics - _______ of a language is its meaning 
Compiler - A complex computer program that takes another program written in a high-level language 
and translates it into an equivalent program in the ma...
- Exam (elaborations)
- • 16 pages •
False - True or False: Computer science is the study of computers 
CPU - The "brain" of the computer is the 
RAM (Random Access Memory) - Main memory is also called 
main memory - All information that a computer is currently working on is stored in 
Syntax - _______ of a language is its form 
Semantics - _______ of a language is its meaning 
Compiler - A complex computer program that takes another program written in a high-level language 
and translates it into an equivalent program in the ma...
Python Final Examination Study Questions and Answers
1. The sys module is used to perform which function? - Gives the user access to display and 
process system information 
2. Which argument is used in an open command when one wants to open a file but not make 
changes to the file? - r (read) 
3. Select the correct code entry from the drop-down in the code sample that will complete the 
datetime function. - import datetime 
4. Which code entry, when used with the random module, can be used to generate a random 
number between one and ten? - r...
- Exam (elaborations)
- • 4 pages •
1. The sys module is used to perform which function? - Gives the user access to display and 
process system information 
2. Which argument is used in an open command when one wants to open a file but not make 
changes to the file? - r (read) 
3. Select the correct code entry from the drop-down in the code sample that will complete the 
datetime function. - import datetime 
4. Which code entry, when used with the random module, can be used to generate a random 
number between one and ten? - r...
Python Final Exam Study Questions with complete solutions merged 2024
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 been converted to text 
Sequential access - file read sequentially from beginning to end, can't skip ahead 
Direct access - can jump directly to any piece of data in the file 
Filename extensions - short sequences of char...
- Exam (elaborations)
- • 17 pages •
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 been converted to text 
Sequential access - file read sequentially from beginning to end, can't skip ahead 
Direct access - can jump directly to any piece of data in the file 
Filename extensions - short sequences of char...
Python Final Exam Questions with Complete solutions 2024
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 
The __________ translates an assembly language program to a machine language program. 
assembler 
translator 
compiler 
interpreter - assembler 
Computers can only execute programs that are written...
- Exam (elaborations)
- • 29 pages •
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 
The __________ translates an assembly language program to a machine language program. 
assembler 
translator 
compiler 
interpreter - assembler 
Computers can only execute programs that are written...
OCR 2023 GCE Sociology H580/02: Researching and understanding social inequalities A Level Question Paper & Mark Scheme (Merged)
OCR 2023 GCSE Economics J205/01: Introduction to economics Question Paper & Mark Scheme (Merged
OCR 2023 Biology A H020/02: Depth in biology AS Level Question Paper & Mark Scheme (Merged)
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)