Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Ozaria: Python Basics

Total questions: 15

Worksheet time: 7mins

Name
Class
Date
1.
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
2.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
3.

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

'Dave'

c)

name

d)

(name)

4.
What is Python?
a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
5.

What is Algorithm?

a)

Fixing bugs

b)

Functions

c)

A sequence of instructions

d)

Game design

6.

Fixing errors in programming is called ...

a)

Optimization

b)

Debugging

c)

Looping

d)

Cleaning

7.

A command that lets us repeat an action multiple times in your code

a)

Algorithm

b)

Loop

c)

Variable

d)

Method

8.

Which line of code is used to make a loop?

a)

for i in range(5)

b)

# Code normally executes in the order it's written.

c)

hero.build("upArrow")

d)

a = "door"

9.

Find the object in the following code:

helper.build("upArrow")

a)

helper

b)

build()

c)

upArrow

d)

hero

10.

Find the argument in the following code:

hero.moveUp(4)

a)

hero

b)

moveUp()

c)

4

d)

Up()

11.

Find the method in the following code:

hero.use("door")

a)

hero

b)

use()

c)

door

d)

" "

12.

Which python operator means 'less than or equal to'?

a)

>=

b)

>

c)

<

d)

<=

13.

Python uses indentation to block code into chunks

a)

True

b)

False

14.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
15.
Which statement correctly assigns the string "Tanner" to the variable name?
a)
name  = print( "Tanner")
b)
input("Tanner")
c)
name = "Tanner"
d)
name = input("Tanner")