wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What will be the output?

name = "Mr Grierson"

print (name)

a)

Mr Grierson

b)

'Mr Grierson'

c)

name

d)

(name)

2.

Which of these is the odd one out?

a)

PRINT

b)

INPUT

c)

INT

d)

IF

3.
What is the name of the environment in Python that write your programs and then test them out?
a)
Shell
b)
Window
c)
IDLE
d)
CLI
4.

What is a variable?

a)

A Function

b)

An integer

c)

A name we give to a value

d)

A property of the program we use

5.

What Brackets do we use with a function?

a)

<>

b)

()

c)

[]

d)

{}

6.

What is a data type than can have one of two values: True or False

a)

boolean

b)

variable

c)

modulo

d)

interpreter

7.

What is the purpose of a test table?

a)

To record the data we input

b)

To use as a list of instructions

c)

To check we are getting the expected output from a program

d)

A type of truth table

8.

What does the following operator mean?

!=

a)

Equals to

b)

Less or equal to

c)

Not equal to

d)

More or equal to

9.

When dividing two integers in Python what data type would the output be?

a)

Float

b)

Integer

c)

String

d)

Boolean

10.

You would store a mobile number as a Integer

a)

True

b)

False

11.

Looking at the program how many times will it loop for before stopping?

a)

7

b)

5

c)

6

d)

8

12.
In python the ' FLOAT data type' can be defined as...?
a)
holds alphanumerical data
b)

holds whole numbers

c)

holds a decimal point in a number

d)
hold either true or false
13.

Which of these functions could convert a number to a string

a)

str()

b)

int()

c)

parseInt()

d)

convert()

14.

I am 18 years old! What will the output be?:

IF you are 70 or older, say “You are aged to perfection!”

ELIF you are exactly 50, say “Wow, you are half a century old!”

ELSE say “You are a spring chicken!”

a)

"You are aged to perfection"

b)

"Wow, you are half a century old!"

c)

"You are spring chicken!"

15.

Who is the creator of Python Language

a)

James Gosling

b)

Guido van Rossum

c)

Dennis Retchie

d)

Bjarne Stroustrup