NEW
Font size
S
M
L
XL
WorksheetsPython basics
Total questions: 19
Worksheet time: 19mins
Name
Class
Date
1.
What is the word (command) used to display numbers and text on the screen?
a)
print
b)
input
c)
output
d)
command
2.
What is a variable?
a)
A box(memory location) where you store values
b)
a type of graphics
c)
Data type
d)
a type of memory
3.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus +
c)
forward slash /
d)
asterisk *
4.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
5.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
6.
What will be the output?
name = 'Dave'
print (name)
name = 'Dave'
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
7.
What will be the output?
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
a)
Good moning 'Dave'
b)
Good morning Dave
c)
Good morning name
d)
Good morning + Dave
8.
Why is it called 'Python'?
a)
The guy who created it loves snakes
b)
The guy who created it loves Monty Python films
c)
You can create a game on python called snake
d)
It was created by someone called Mr Python
9.
When you have an error in your code what is the term to summarise finding and fixing that error?
a)
Error checking
b)
Debugging
c)
Syntax finder
d)
Error finder
10.
Python is an example of a....
a)
Text-based programming language
b)
Object orientated programming language
c)
language written in java script
d)
Visual-based programming language
11.
What would print (10 + 16) produce?
a)
20
b)
22
c)
24
d)
26
12.
Which of these would work as a piece of code?
a)
IF answer == "Yes":
b)
if answer == "Yes"
c)
if answer == "Yes":
d)
if answer = "yes":
13.
If you want more than one option for your code, what do you use (after if)?
a)
elif
b)
else
c)
ifif
14.
What is the answer to print (12/6)?
a)
1
b)
2
c)
6
d)
10
15.
How do you display text?
a)
input
b)
output
c)
print
d)
variable
16.
What is python?
a)
a programming language
b)
DTP software
c)
Spreadsheet software
d)
Computer
17.
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
18.
The second part of if, that is executed when the condition is false
a)
if
b)
else
c)
for
d)
input
19.
The character that must be at the end of the line for if, while, for etc.
a)
:
b)
;
c)
.
d)
,
Reset
