wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Intro to Python

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.
What does the print command do?
a)
Lets you display a message to the user
b)
Reads data typed in by the user
2.
Will this code run correctly?
a)
Yes
b)
No
3.
Will this code run correctly?
a)
Yes
b)
No
4.

Select every answer that will cause an error

a)

Leaving out the brackets

b)

Leaving out the quotation marks

c)

Spelling Print with a capital P

d)

Leaving a space between each line of code

5.

What will the output be from the following code?

a)

3+4

b)

7

c)

print(3+4)

6.

What will the output be from this code?

a)

24

b)

12*2

c)

print 12*2

7.

Which symbol stands for multiply?

a)

*

b)

/

c)

+

d)

-

8.

Which symbol stands for divide?

a)

*

b)

/

c)

+

d)

-

9.
What is the name of the variable?
a)
first_name
b)
Jeremy
c)
print
10.
What will this code display?
a)
Your name is first_name
b)
Your name is Jeremy
11.
What does the input command do?
a)
Lets you display a message to the user
b)
Reads data typed in by the user
12.
You can store data inside a Variable
a)
True
b)
False
13.
What is the name of the variable?
a)
form_tutor
b)
input
c)
print
14.

What will this code display?

a)

The result is number1 + number2

b)

The result is 8 + 20

c)

The result is 28

15.

What is the name of the variable in this code?

a)

vegetable

b)

input

c)

print

16.

Variables are used to display data to the user

a)

True

b)

False

17.

Variables can never be changed once they have been set

a)

True

b)

False

18.
Which of these is an Integer?
a)
5
b)
23.5
c)
True/False
d)
Valley Park
19.
Which of these is a String?
a)
56.78
b)
Miss Woodruff
c)
2478
d)
On/Off
20.
Which of these is a Float?
a)
Maidstone
b)
34.67
c)
19087
d)
Yes/No
21.
Which data type will be needed for this code?
a)
String
b)
Integer
22.
An Integer is used to store decimal numbers
a)
True
b)
False
23.
A String is used to store characters
a)
True
b)
False
24.
When you type data into Python, it automatically stores it as a String
a)
True
b)
False
25.

How many variables are in this code?

a)

2

b)

1

c)

4

26.

Testing the data and giving a different response depending on the result

a)

print

b)

Selection

c)

Variable

27.

What would I need to type in for the program to display Correct?

a)

A

b)

B

c)

Neither

d)

Both

28.

How many variables are in this code?

a)

1

b)

2

c)

0

29.

How many variables are in this code?

a)

0

b)

1

c)

2

30.

Which response will be displayed?

a)

You are too young

b)

You are old enough