NEW
Font size
S
M
L
XL
WorksheetsNavs Python Quiz
Total questions: 12
Worksheet time: 6mins
Name
Class
Date
1.
What will the output be from the following code?
print("Hello world!\nHello world!")
print("Hello world!\nHello world!")
a)
Hello world! Hello world!
b)
Hello world!
Hello world!
Hello world!
c)
SyntaxError
d)
Hello world!
2.
What will the output be from the following code?
print("Hello" + str(2) + "world!")
print("Hello" + str(2) + "world!")
a)
Hello world! Hello world!
b)
Hello2world!
c)
Hello Hello world! world!
d)
SyntaxError
3.
What is python named after
a)
The snake
b)
Television show called Monty Python
4.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
5.
If you want more than one option for your code, what do you use (after if)?
a)
elif
b)
else
c)
ifif
6.
people = ["John", "Rob", "Bob"]
print (people[1])
what would this result be?
a)
John
b)
Rob
c)
Bob
7.
In python the ' STRING data type' can be defined as...?
a)
holds alphanumeric text
b)
hold whole numbers
c)
holds numbers with a decimal point
d)
holds either a true or false value
8.
In python the ' BOOLEAN data type' can be defined as...?
a)
holds alphanumerical data
b)
holds whole numbers
c)
holds a number with a decimal point
d)
holds either true or false
9.
What is the correct definition for a VARIABLE?
a)
a changeable value, such as a score in a computer game.
b)
a value that cannot be changed
10.
What data type would be used for storing someone's telephone numbers?
a)
Float (using a decimal point)
b)
Integer (just whole numbers)
c)
String (alphanumerical data)
11.
What is the name of the environment in Python that write your programs and then test them out?
a)
Shell
b)
Window
c)
IDLE
d)
CLI
12.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
Reset
