Font size
WorksheetsG7B_Quiz1_2T
Total questions: 15
Worksheet time: 8mins
The result of this program:
Friday = False
if Friday:
print "Jeans day!"
else:
print "Uniform day"
Jeans day
Today is Friday
Uniform day
Not Friday
What is the output?
condition
True
Program has a syntax error.
3 > 2
What is the output?
True
False
condition1
condition2
In Python, what are if-statements used for?
Looping
Indexing
Decision Making
Testing
What is the output of this code?
click = True
Like = 0
if click:
Like = Like + 1
print(Like)
0
1
2
3
What is the output of the following code?
What is the output of following code
Temperature = 20
Thermo = 15
if Temperature < 15:
Thermo = Thermo + 5
print(Thermo)
20
15
25
10
What is the output of the following code?
Time = "Day"
Sleepy = False
Pajamas = "Off"
if Time == "Night" and Sleepy == True:
Pajamas = "On"
print(Pajamas)
off
on
False
Day
What will the be the output of the following code?
if (10<0) and (0 <-10):
print(“A”)
else:
print(“B”)
A
B
AB
BA
What is the output of the following code?
a = "b"
if True or True:
a = "a"
print(a * 2)
bb
aa
ab
ba
What would be outputted here?
it divides by 7!
it divides by 3!
It divides by 7.
It divides by 3.
What will be outputted?
number is bigger than 10
nothing
an error
NUMBER IS BIGGER THAN 10
Which condition is a logic error (will not run properly)?
x>=1 AND x<=100
1<=x<=100
1>x>100
x<1 OR x>100
// remainder of the division (%)
num = 8
if num%2 == 0:
print("the number is even")
else :
print("the number is odd")
even
the number is even
the number is odd
None
The result of this program:
Friday = true
if Friday:
print "Jeans day!"
else:
print "Uniform day"
Jeans day
Today is Friday
Uniform day
Not Friday
