Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Variables and Inputs in Python

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Write a line of code to output the string "Hello world"

(a)  

2.

What is 'userName' an example of?

a)

Command

b)

Variable

c)

Username

d)

Input

3.

What type of memory is part of the CPU?

a)

RAM

b)

Registers

c)

Hard Drive

d)

Buses

4.

Which of these clock speeds is the fastest?

a)

1GHz

b)

1MHz

c)

2000 MHz

d)

0.5Ghz

5.

Which of these does NOT affect the performance of a computer?

a)

Clock speed

b)

Number of cores

c)

RAM size

d)

Hard Drive size

6.

Which level of language can be understood by the CPU?

a)

Plain English

b)

High Level

c)

Low Level

d)

Machine Code

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

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

"Dave"

c)

name

d)

(name)

9.

What will this print to the screen?


print(2*4)

a)

2*4

b)

8

c)

4

d)

error

10.

What would be printed to the screen for print(z)?

a)

Orange

b)

Banana

c)

Cherry

d)

Hello World!