wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Basics - Year 8

Total questions: 14

Worksheet time: 6mins

Name
Class
Date
1.
What is Python?
a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
2.
What does INT means in python?
a)
Decimal Numbers
b)
Whole Number
c)
Text
d)
Floating Point Number
3.
Why are the indents necessary after the if and else statements?
a)
Do not follow these instructions above 
b)
Logic of the code will make sense
c)
Follow these instructions if the statement above is true
d)
Code will have no syntax error
4.
What will the following code do? 
name = "Bob"
if name == "Bob": 
     print ("Hello " + name) 
else:  
     print ("I dont know you")
a)
prints bob
b)
prints Hello Bob
c)
nothing syntax error
d)
prints I don't know you
5.
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
6.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
7.
What will be the output?
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.
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":
9.
If you want more than one option for your code, what do you use (after if)?
a)
elif
b)
else
c)
ifif
10.
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
11.
What button do you press to compile (run) your program so that it runs in the shell?
a)
F3
b)
F5
c)
F7
d)
F9
12.

Integers in Python are designated

a)

the full word integer

b)

num

c)

number

d)

int

13.

Integers are ____________ and floats are _____________

a)

whole numbers and exponents

b)

powers and fractions

c)

fractions and whole numbers

d)

whole numbers and decimal numbers

14.
What is python?
a)
a programming language 
b)
DTP software 
c)
Spreadsheet software
d)
Computer