WGU E010 Foundations of Programming (Python) Practice Assessment
Study online at https://quizlet.com/_jbh1ws
1. Which symbol begins a single-line comment in Python?
// (double forward slash)
# (pound symbol)
* (asterisk)
% (percent symbol): # (pound symbol)
2. Which data type is the value 3.14 in Python?
Integer
Float
String
Boolean: Float
3. In Python, what must follow the in keyword in a for loop?
A condition
An iterable object
A number
A variable name: An iterable object
4. Which type of loop is designed for iterating a specific number of times?
while loop
for loop
infinite loop
do-while loop: for loop
5. Which components are required in every Python while loop?
A condition and an indented code block
A variable and a return statement
A counter and a break statement
An iterator and a list: A condition and an indented code block
6. Which keyword is used to exit a loop prematurely in Python?
return
break
stop
end: break
7. In the code for item in my_list:, what does item represent?
The index of the current element
1/9
, WGU E010 Foundations of Programming (Python) Practice Assessment
Study online at https://quizlet.com/_jbh1ws
The current element being processed
The length of the list
The entire list: The current element being processed
8. Which Python data structure automatically prevents duplicate values from
being stored?
List
Tuple
Dictionary
Set: Set
9. Which Python data structure cannot be modified after creation?
List
Dictionary
Tuple
Set: Tuple
10. What must a developer do to run Python code written in a text editor?
Save the file and use a Python interpreter.
Press a run button within the editor.
Upload the code to a web server.
Convert the code to machine language first.: Save the file and use a Python interpreter.
11. What advantage does an integrated terminal provide compared to using a
separate terminal application?
Faster code execution speed
Access to additional Python libraries
Eliminates need to switch between applications
Automatic syntax error detection: Eliminates need to switch between applications
12. Which action allows a Python script located in a different folder to be
executed in the terminal?
Use the edit command to open the script first
Move the script to your desktop
Use the cd command to navigate to the script's directory
Rename the script to match the terminal's path: Use the cd command to navigate to the
script's directory
2/9
Study online at https://quizlet.com/_jbh1ws
1. Which symbol begins a single-line comment in Python?
// (double forward slash)
# (pound symbol)
* (asterisk)
% (percent symbol): # (pound symbol)
2. Which data type is the value 3.14 in Python?
Integer
Float
String
Boolean: Float
3. In Python, what must follow the in keyword in a for loop?
A condition
An iterable object
A number
A variable name: An iterable object
4. Which type of loop is designed for iterating a specific number of times?
while loop
for loop
infinite loop
do-while loop: for loop
5. Which components are required in every Python while loop?
A condition and an indented code block
A variable and a return statement
A counter and a break statement
An iterator and a list: A condition and an indented code block
6. Which keyword is used to exit a loop prematurely in Python?
return
break
stop
end: break
7. In the code for item in my_list:, what does item represent?
The index of the current element
1/9
, WGU E010 Foundations of Programming (Python) Practice Assessment
Study online at https://quizlet.com/_jbh1ws
The current element being processed
The length of the list
The entire list: The current element being processed
8. Which Python data structure automatically prevents duplicate values from
being stored?
List
Tuple
Dictionary
Set: Set
9. Which Python data structure cannot be modified after creation?
List
Dictionary
Tuple
Set: Tuple
10. What must a developer do to run Python code written in a text editor?
Save the file and use a Python interpreter.
Press a run button within the editor.
Upload the code to a web server.
Convert the code to machine language first.: Save the file and use a Python interpreter.
11. What advantage does an integrated terminal provide compared to using a
separate terminal application?
Faster code execution speed
Access to additional Python libraries
Eliminates need to switch between applications
Automatic syntax error detection: Eliminates need to switch between applications
12. Which action allows a Python script located in a different folder to be
executed in the terminal?
Use the edit command to open the script first
Move the script to your desktop
Use the cd command to navigate to the script's directory
Rename the script to match the terminal's path: Use the cd command to navigate to the
script's directory
2/9