Worksheetsif...else statements
Total questions: 8
Worksheet time: 6mins
Name
Class
Date
1.
What is my result?
mickey = mouse .
if mickey == mouse: .
. print("Mickey is a mouse")
.else: .
. print("Minnie rules") .
mickey = mouse .
if mickey == mouse: .
. print("Mickey is a mouse")
.else: .
. print("Minnie rules") .
a)
"Mickey is a mouse"
b)
"Minnie rules"
c)
Nothing prints.
d)
"Mickey is a mouse" & "Minnie rules"
2.
What is my result?
john = 5 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
john = 5 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
a)
John is getting ice cream
John is getting grapes
John is getting grapes
b)
John is getting apple juice
John is getting grapes
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
3.
What is my result?
john = 10 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
john = 10 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
a)
John is getting ice cream
John is getting grapes
John is getting grapes
b)
John is getting apple juice
John is getting grapes
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
4.
What is my result?
john = 5 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
john = 5 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
a)
John is getting ice cream
John is getting grapes
John is getting grapes
b)
John is getting apple juice
John is getting grapes
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
5.
What is my result?
john = 8 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
john = 8 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
a)
John is getting ice cream
John is getting grapes
John is getting grapes
b)
John is getting apple juice
John is getting grapes
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
6.
What is my result?
john = 6 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
john = 6 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
a)
John is getting ice cream
John is getting grapes
John is getting grapes
b)
John is getting apple juice
John is getting grapes
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
7.
What is my result?
john = 6 .
if john != 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
john = 6 .
if john != 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
a)
John is getting ice cream
John is getting grapes
John is getting grapes
b)
John is getting apple juice
John is getting grapes
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
8.
What is my result?
john = 3 .
if john < 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
john = 3 .
if john < 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
a)
John is getting ice cream
John is getting grapes
John is getting grapes
b)
John is getting apple juice
John is getting grapes
John is getting grapes
c)
John is getting apple juice
d)
John is getting ice cream
100 %
