wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

python skillsG7

Total questions: 20

Worksheet time: 10mins

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 will be the output?
name = 'Dave'
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
4.

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

5.
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
6.
What will the output be from the following code?
print("Hello" + str(2) + "world!")
a)
Hello world! Hello world!
b)
Hello2world!
c)
Hello Hello world! world!
d)
SyntaxError
7.

What does the following code do? myAge = int (myAge)

a)

Converts the var (variable) myAge to a string

b)

Converts the var (variable) myAge to a integer

c)

Converts the var (variable) myAge from a integer to a string

d)

Converts the var (variable) myAge to if statement

8.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
9.
What will the output be from the following code?
print(3*4+5)
a)
27
b)
17
c)
12
d)
SyntaxError
10.
What would print (10 + 16) produce?
a)
20
b)
22
c)
24
d)
26
11.
The number or word we give to a variable
a)
Value
b)
Bug
c)
Information
d)
Text
12.
Which function takes a users input
a)
print()
b)
int()
c)
input()
d)
def
13.

What is the type of the variable ‘x’?


x = 5.0

a)

float

b)

int

c)

str

d)

bool

14.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
15.

Which is the Python logo?

a)
b)
c)
d)
16.

What syntax would you use to create a name variable?

a)

name=input()

b)

input=name

c)

name=input{}

d)

name=INPUT

17.

_____ data type contain integer values with no decimal such as 1, 200, 999 etc.

a)

int

b)

float

c)

char

d)

String

18.

_____ data type contain a set of characters (text) or word such as Hello, Ali, Car Type etc.

a)

int

b)

float

c)

char

d)

String

19.

A variable is a named value that can be changed in the program.

a)

False

b)

True

20.

Which value is a String?

a)

64

b)

"cat"

c)

True

d)

0.5