Font size
Worksheetspython 3-5 unit 10gr
Total questions: 25
Worksheet time: 15mins
Which code means not equal to?
==
<=
>
!=
Which of the following is NOT a Comparison Operator?
<=
==
=
!=
Which of the following is NOT a Boolean Statement?
name == "duck"
8 <= 12
num = int(Input("Pick a number.")
total > 0
Which booleans have a value of True?
12 - 3 == 9
30 <= 25
17 != 11 + 6
15 / 5 == 3.0
Which of the following are valid values for a boolean in Python?
Select ALL that apply.
True
false
0
False
1
What is the final value for total?
6
4
7
9
Which lines of code will be skipped when the program is run?
4, 7, 8
4
3, 7, 8
7, 8
In the provided code, what is the final value for alarm?
6
7
8
9
Review the provided code. Are there any possible flaws in this programming code.
There are no flaws in the program
A colon, : , is missing from the end of line 2
The value for day could be spelled incorrectly.
The value for day could be entered as a number.
What is the truth value for the compound Boolean statement?
5 == 2 + 3 or 7 > 8
True
False
No Value
In the provided code, what is the final output?
"Fred"
15
25
35
if a equal b
What is the output?
more than 7
more than 23
spam
7
If you want to test more than one condition (chained condition), what do you use after if statement?
elif
else
ifif
else if
Data type that can only be true or false
int
string
boolean
float
What will be the output of the following code?
Greater
Smaller
Error
None
Which python operator means 'less than or equal to'?
>=
>
<
<=
What is the value of the expression 100 / 25?
4
4.0
"4.0"
'4.0'
What is the output of the following code :
print 9//2
4.5
4.0
4
3
What is the answer of this expression, 22 % 3 is?
7
1
0
5
x = 4.5
y = 2
print(x//y)
2.0
2
9
9.0
