wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Y8 - Intro to Python - L6 Putting it all together

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.

What does == mean?

a)

Assign a value to a variable

b)

A value is greater than another value

c)

Check that the value on the right of the == matches the value on the left

2.

What will happen when we run this:

name = input()

print ("Hi there, ",name)

a)

It will output Hi there, and the name entered

b)

There is an syntax error

c)

It will output Hi there name

3.
What is the word (command) used to display numbers and text on the screen?
a)
print
b)
input
c)
output
4.
What is a variable?
a)

A memory location where you store values

b)

a type of graphics in memory

c)

Data type in memory

5.

Which mathematical operator (symbol) is used in python to assign values to a variable?

a)
equals =
b)
plus + 
c)
asterisk *
6.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
7.

Which of these would work as a piece of code and is not a syntax error?

a)
IF answer == "Yes":
b)
if answer == "Yes"
c)
if answer == "Yes":
8.

What is the meaning of the following comparison operator (Mathematical symbol)?
a < b

a)
Greater than
b)
Less than
c)
Not equal to
d)
Greater than or equal to
9.
What is the meaning of the following comparison operator?
a >= b
a)
Equal to
b)
Not equal to
c)
Greater than or equal to
d)
Less than or equal to
10.
What is the meaning of the following comparison operator?
a != b
a)
Equal to
b)
Greater than
c)
Not equal to
d)
Less than or equal to
11.
What will the output be from the following code?
print(3+4)
a)
3+4
b)
7
c)
SyntaxError
12.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
13.

What is the output from the following code:
name = "Fred"

print("Hello " + NAME)

a)
Hello Fred
b)

Hello NAME

c)

An error will occur

14.

Which method forces the users to enter a number?

a)

int()

b)

text()

c)

input()