NEW
Font size
WorksheetsAP KT 2 Python Quiz
Total questions: 10
Worksheet time: 5mins
What symbol is used for comments in Python?
#
//
/*
--
Identify the error in the following line of code: `prinT ("welcome to the drinks menu")`
The function name should be `print` instead of `prinT`
The string should be enclosed in single quotes
The parentheses are not needed
The string should be in uppercase
What is the correct Python symbol for the multiplication operator?
x
*
/
-
Which of the following is NOT a comparison operator in Python?
==
!=
<=
%%
Table showing comparison operators and their symbols
+
-
*
÷
What is the correct Python symbol for division?
÷
x
/
-
What is the purpose of comments in Python code?
To execute a block of code
To describe the code
To create variables
To perform calculations
What is the error with this line of code?
print ("Hello" + Name)
Capital N for name should be 'n'
Capital H for hello should be 'h'
Too many brackets
is not needed
What is the error with this line of code?
print("1-coke 2-fanta 3- sprite)
missing end )
Missing end "
print should be capital P
What is missing from this line of code?
print ("great choice" choice + "That is £2 please.")
-
=
+
))
