WorksheetsPython Syntax
Total questions: 15
Worksheet time: 8mins
What is the word (command) used to display numbers and text on the screen?
show
output
command
What can be used to store information and values so that it can be used later?
Graphic
Variable
Output
What is a input?
To plug in something.
A function that allows us to ask the user to enter some data.
Data displayed on a screen.
A function
Python is a
text language
database language
programming language
Code for
Five is greater than two!
if 5 > 2:
print("Five is greater than two!")
if 5 = 2:
print("Five is greater than two!")
if 5 > 2: Print("Five is greater than two!")
In a guessing game, what will the following code snippet output if guess is '15' and number is 15?
Correct!
Incorrect!
Syntax Error
AttributeError
Which of the following Python code is correct?
age = input ("What is your age? ")
age=input ("What is your age? ")
Which of the following Python code is correct?
if age>=18:
print("Congrats! You are old enough to vote!!")
else:
print("You are NOT old enough to vote. Sorry Charlie")
else:
print("You are NOT old enough to vote. Sorry Charlie")
if age>=18:
print("Congrats! You are old enough to vote!!")
What must surround a string in Python code?
Brackets ()
Quote Marks " '
Star *
Hashtag #
A 'string' appears what colour?
Blue
Green
Yellow
Black
A 'print' message is what colour?
Black
Green
Purple
Blue
Which is correct?
A
B
What is the name of the variable in this program?
colour
input
" "
