WorksheetsPython Course Selection
Total questions: 31
Worksheet time: 18mins
The character that must be at the end of the line for if?
:
;
.
,
The order of the code
Sequence
Selection
Iteration
Variable
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
I am 71 years old! What will the output be?:
IF you are 70 or older, say “You are aged to perfection!”
ELIF you are exactly 50, say “Wow, you are half a century old!”
ELSE say “You are a spring chicken!”
“You are aged to perfection!”
"Wow, you are half a century old!"
"You are a spring chicken!"
team = Cowboys
if team = Cowboys:
print "Dallas is #1"
What is the output?
5 is equal to 4
5 > 4
"5 is greater than 4"
5 is greater than 4
If the user enters 60, what is the output?
You are old!
You are middle-aged!
You are young!
Error message
if answer == (“Man United”)
print"What football team do you support?"
What three things can make up an if statement?
if age is less than 20 then
if age is less than 20 and greater than equal or equal to 15 then
