wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Ch 1 Review

Total questions: 23

Worksheet time: 11mins

Name
Class
Date
1.
What is Python?
a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
2.

To execute a Python program, you need a Python interpreter.

a)

True

b)

False

3.

Python is the fastest growing programming language:

a)

True

b)

False

4.

What is IDE?

a)

Integrated Development Environment

b)

Implicit Deployment Environment

c)

Interrogated Development Environment

5.

"hello"

a)

String

b)

Integer

c)

Float

d)

Word

6.

What will be the output from the following Python code?

print("3+4")

a)

7

b)

3+4

c)

34

d)

SyntaxError

7.

What will the output be from the following Python code?

print(3+4)

a)

3+4

b)

7

c)

SyntaxError

d)

print(3+4)

8.

What value results from the following expression: print("=" * 5)

a)

=10

b)

Integer

c)

=====

d)

Error

9.

What value results from the following expression: print( (1 + 4) * 2)

a)

9

b)

10

c)

5

d)

Error

10.

Why did Guido van Rossum call his programming language Python?

a)

He thinks Pythons were cool

b)

He couldn't think of anything else

c)

A friend suggested it

d)

He loves Monty Python

11.

What can a variable not start with?

a)

A special character

b)

A capital letter

c)

A number

d)

A lower case letter

12.

What do we use at the start of a comment line?

a)

@

b)

#

c)

"

d)

*

13.

What arithmetic operations does // perform in Python?

a)

Remainder

b)

Division

c)

Floor Division

d)

Modulus

14.

Which of these is true?

a)

A syntax error will stop a program running

b)

A logic error will stop a program running

c)

A syntax error will let the program run but may have unexpected outcomes

d)

The program will always show an error message for a logic error

15.

By default any data inputted by the user is of data type string in python.

a)

True

b)

False

16.

Looking at the code, what is the output?

a)

54

b)

2331

c)

var1+var2

d)

Error

17.

Which answer is the correct output?


print(5.0 * 5)

a)

25

b)

10

c)

10.0

d)

25.0

18.

What will be the output?


print(int(3.98))

a)

3.98

b)

Error

c)

3

d)

4

19.
What will the output be from the following code?
print(3*4+5)
a)
27
b)
17
c)
12
d)
SyntaxError
20.
What syntax can you use to insert a line break between strings so that they appear over multiple lines?
a)
/
b)
\n
c)
\l
d)
n
21.
What does the print function do in python?
a)
It's a variable.
b)
It can input data.
c)
It displays something like a string or integer
d)
It loops the code.
22.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
23.

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