1 | Page
WGU E010 FOUNDATIONS OF
PROGRAMMING (PYTHON)
QUESTIONS AND ANSWERS
Which symbol begins a single-line comment in Python?
// (double forward slash)
# (pound symbol)
* (asterisk)
% (percent symbol) - ANSWER-# (pound symbol)
Which data type is the value 3.14 in Python?
Integer
Float
String
Boolean - ANSWER-Float
In Python, what must follow the in keyword in a for loop?
A condition
An iterable object
A number
, 2 | Page
A variable name - ANSWER-An iterable object
Which type of loop is designed for iterating a specific number of
times?
while loop
for loop
infinite loop
do-while loop - ANSWER-for loop
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 - ANSWER-A condition and an indented
code block
Which keyword is used to exit a loop prematurely in Python?
return
break
stop
end - ANSWER-break
WGU E010 FOUNDATIONS OF
PROGRAMMING (PYTHON)
QUESTIONS AND ANSWERS
Which symbol begins a single-line comment in Python?
// (double forward slash)
# (pound symbol)
* (asterisk)
% (percent symbol) - ANSWER-# (pound symbol)
Which data type is the value 3.14 in Python?
Integer
Float
String
Boolean - ANSWER-Float
In Python, what must follow the in keyword in a for loop?
A condition
An iterable object
A number
, 2 | Page
A variable name - ANSWER-An iterable object
Which type of loop is designed for iterating a specific number of
times?
while loop
for loop
infinite loop
do-while loop - ANSWER-for loop
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 - ANSWER-A condition and an indented
code block
Which keyword is used to exit a loop prematurely in Python?
return
break
stop
end - ANSWER-break