NEW
Font size
WorksheetsKS3 Year 9 Python Quiz 02
Total questions: 8
Worksheet time: 4mins
What is the correct way to print a message in Python?
print message "Hello World"
print("Hello World")
echo "Hello World"
printf("Hello World")
How do you read a user's input and store it in a variable named 'name'?
name = input("Enter your name: ")
input("Enter your name: ") -> name
name <- input("Enter your name: ")
get("Enter your name: ") as name
Which of the following is a valid variable assignment in Python?
5 = x
x = 5
int x = 5
var x = 5
What will the code print?
Smaller
Greater
Error
Nothing
In Python, 'elif' is short for:
else if
else information
either if
else in function
What will code output?
Adult
Child
Teenager
Error
What does the 'input()' function in Python do?
Outputs data to the screen
Reads text from a file
Takes user input
Calculates numeric input
Which operator checks for equality in Python?
=
==
===
!=
