NEW
Font size
S
M
L
XL
Worksheetspython
Total questions: 10
Worksheet time: 20mins
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 is syntax?
a)
Syntax is the word used to describe an error
b)
Syntax is the rules of the programming language
c)
It is used to read information
d)
It is used to output information
3.
What is python named after
a)
The snake
b)
Television show called Monty Python
4.
Python identifies blocks of code by
a)
BEGIN and END keywords
b)
{ and }
c)
aligning up the starts of lines (indentation)
d)
guessing
5.
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
6.
If you want more than one option for your code, what do you use (after if)?
a)
elif
b)
else
c)
ifif
7.
people = ["John", "Rob", "Bob"]
print (people[1])
what would this result be?
a)
John
b)
Rob
c)
Bob
8.
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
9.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
10.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
Reset
