NEW
Font size
WorksheetsPython L1 Programming Challenge
Total questions: 30
Worksheet time: 22mins
What is the output of this code?
a
dog
o
g
What is the output of this code?
2 3 4 5 6 7
4 6 8
2 4 6 8
3 5 7 9
What is the output of this code?
1 2 3 4 1 2 3 4
0 1 2 3 1 2 3 4
0 1 2 3 4 1 2 3 4 5
1 2 3 4 2 3 4 5
What is the output of this code?
8
Type Error
53
Syntax Error
What is the output of this code?
79
Syntax Error
16
Type Error
What is the output of this code?
A
B
C
D
What is the output of this code?
<class 'int'>
<class 'char'>
<class 'str'>
<class 'float'>
What is the output of this code?
<class 'int'>
<class 'char'>
<class 'str'>
<class 'float'>
What is the output of this code?
3
3.0
9/3
SyntaxError
When will this loop terminate?
When keep_on_going is greater than 999
When keep_on_going is not equal to 999
When keep_on_going is equal to 999
When keep_on_going is less than 999
This python code draws a _____.
Star
Circle
Rectangle
Square
What is the output of this code?
24
38
19
70
What is the output of this code?
2
2.5
3
3.5
What is the output of this code?
Correct! Thanks for playing
Correct!
Thanks for playing
SyntaxError
What is the output of this code?
foo
bar
foobar
Nothing is printed
What is the output of this code?
True
False
True and False
SyntaxError
What is the output of this code?
True
False
x < y or z < y
SyntaxError
What is the output of this code?
Always True
Always False
Sometimes True, Sometimes False
SyntaxError
What is the output of this code?
Always True
Always False
Sometimes True, Sometimes False
SyntaxError
What is the output of this code?
Always True
Always False
Sometimes True, Sometimes False
SyntaxError
What is the output of this code?
Always True
Always False
Sometimes True, Sometimes False
SyntaxError
What is the output of this code?
10 is good
10 is out of bounds!
out of bounds!
NameError: name 'outOfBounds' is not defined
What is the output of this code?ㅤㅤㅤㅤㅤㅤㅤ
10
20
Syntax Error
10 20
What is the output of this code?
ㅤㅤ
Gaddis,, Tony
Gaddis, Tony
Tony, Gaddis,
Tony, Gaddis
This python code draws _____.
115 stars
200 stars
3 stars
1 star
What is the output of this code?
ㅤㅤ
10 11 12 113 14 15 16 17 18 19 20
11 12 13 14 15 16 17 18 19 20
10
10 11 12 13 14 15 16 17 18 19
What will be the output of the program represented by this flowchart?
ㅤㅤ
1 2 3 4
2 3 4 5
1 2 3 4 5
Nothing is printed
What will this program do?
ㅤㅤ
Print "You got it!" once if the user says "yes" to "Continue?"
Repeatedly get input from the user and print "You got it!" for as long as they input "yes" to "Continue?"
Print "You got it!" in an infinite loop if the user says "yes" to "Continue?"
Nothing is printed
What will this program do?
ㅤㅤ
Print what is returned by get_answers()
Print "Error" if get_answers() returns an empty string, otherwise print answers
Print answers if get_answers() returns an empty string, otherwise print "Error"
Print "Error" followed by answers if get_answers() returns an empty string, otherwise just print answers
What is the output of this code?
catac
cattac
IndexError
Nothing is printed
