NEW
Font size
WorksheetsPython IF Statements
Total questions: 10
Worksheet time: 5mins
Any statements inside an IF clause (section) can be executed multiple times.
FALSE
TRUE
It is possible to execute both the (block of) statements under if and the else clauses at the same time.
Yes
No
What is the output?
True
False
condition1
condition2
Given the nested if-else below, what will be the value x when the code is executed successfully.
0
4
2
3
This operator checks to see if one value is the same as the other value
==
!=
>
<
What would be outputted here?
Bigger than 2!
Number is 5
Bigger than 2!
Number is 5
Nothing
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
What is the output?
3
3
7
3
5
7
7
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
