NEW
Font size
WorksheetsPython - Selection (IF statements)
Total questions: 17
Worksheet time: 8mins
In Python, When we want to test multiple conditions we use elif statement.
True
False
In Python, the selection statements are also known as decision making statements or branching statements.
True
False
1==0
True
False
5 >= 5
True
False
How do you write an 'else if' in Python?
elseif
elif
elife
else
what does != mean
not
swap value
not equal
equal
What will this code print?
access denied
access granted
error
password
The character that must be at the end of the line for if?
:
;
.
,
What will the code do?
nothing
display Hello Bob
display I don't know you
display Hello
To add selection in to a program, what would you use?
An 'int' command
A 'while' loop
An 'If' statement
a 'print' command
If the user enters 60, what is the output?
You are old!
You are middle-aged!
You are young!
Error message
What will be output from this code?
Well Done
Excellent Work
Distinction
Hard Luck
The data type of mynum is int.
What is the missing word that lets us take input as data type int?
str
integer
int
float
