NEW
Font size
S
M
L
XL
WorksheetsPython Basics
Total questions: 10
Worksheet time: 5mins
Name
Class
Date
1.
A named, reusable set of programming statements to perform a specific task defines
a)
applications
b)
algorithms
c)
modules
d)
functions
2.
The spelling and grammar rules of a programming language is called
a)
GSP
b)
syntax
c)
code
d)
comments
3.
What will the output be from the following code?
Print("Hello world!")
Print("Hello world!")
a)
NameError
b)
Hello world!
c)
"Hello world"
d)
Print(Hello world!)
4.
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
5.
Tells the interpreter that the code which follows is a function
a)
const
b)
int
c)
def
d)
while
6.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
7.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
8.
What does the print function do in python?
a)
It's a variable.
b)
It can input data.
c)
It displays something like a string or integer
d)
It loops the code.
9.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
10.
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
Reset
