wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

python quiz

Total questions: 92

Worksheet time: 1hrs 22mins

Name
Class
Date
1.
What flowchart symbol does this represent?
a)
Input/Output
b)
Start/End
c)
Decision
d)
Process
2.
What is this symbol?
a)
Decision
b)
Input/Output
c)
Start/End
d)
Process
3.
What does this pseudocode do?
print "Hello"
a)
Nothing
b)
Prints the word "Hello" to the output
c)
hello is print in pseudocode
d)
The code won't work
4.
Abstraction is the representation of real world problems in a computer
a)
True
b)
False
5.
What is decomposition?
a)
Breaking down of soil
b)
Breaking down of a problem into smaller chunks
c)
Making a problem a bigger deal 
d)
Breaking smaller chunks of problems into one large problem
6.
A linear search is when a list is split into 2 and compared?
a)
True
b)
False
7.
What is a binary search?
a)
Each item is checked in order
b)
The list is split into 2 and compared
c)
The first 2 values are compared and moved
d)
Nothing happens
8.
Bubble sort takes the first two values of a list, and swaps them if wrong?
a)
True
b)
False
9.
Merge Sort is?
a)
When a list is kept as one and compared
b)
List is split into 2 and merged together
c)
List is split into 2 and kept seperate
d)
Nothing
10.
An Insertion sort builds the final list two items at a time 
a)
True
b)
False
11.
What is pseudocode?
a)
Simplified programming language, that is not a specific language
b)
Complicated programming language
c)
Simple programming language, which is linked to a specific language
d)
A type of cheese
12.

What is an algorithm?

a)

Patterns and trends used to solve a problem

b)

A set of step-by-step instructions to resolve a problem

c)

A programming language

13.

What are algorithms used for?

a)

To plan out the solution to a problem

b)

As a platform to program a solution

c)

To test a solution to a problem

14.

Which of these is NOT an algorithm?

a)

Following recipe instructions

b)

Working out how an engine works

c)

Tying your shoelaces

d)

Making a cup of coffee

15.

What does an algorithm need to be (choose more than 1)

a)

Clear instructions

b)

Exact

c)

Easy to understand

d)

Complex

16.

When can an algorithm be used?

a)

Only with computers

b)

For programming

c)

To design a solution to any problem

17.

What is decomposition?

a)

Searches the computer's memory for data

b)

Repeats a program

c)

Getting small part of a problem and adding them together

d)

Breaking down a complex problem

18.

What is abstraction?

a)

Removal of certain details, keeping relevant the information

b)

Stores data in a program for retrieval

c)

Freedom from representing art

d)

Detects errors while program is running

19.

If it is AFTER 7am, what do you need to do?

a)

Take the bus

b)

Take the subway

c)

Check the time

d)

Leave home

20.

What should be considered when designing an algorithm?

a)

If there is more than one way to solve the problem

b)

If the correct hardware is being used

c)

If the correct software is being used

21.

You are at the yellow arrow, pointing in the direction indicated. How would you move to fill in the 2 black squares?

a)

Straight, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square

b)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square

c)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn right, Straight x 1, Fill Square

d)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 2, Fill Square

22.

Какой язык программирования ты учил последние полгода?

a)

Python

b)

Delphi

c)

C/C++

d)

PHP

23.

Для вывода сообщений на екран консоли используеться функция:

a)

input()

b)

print()

c)

int()

d)

string()

24.

Для преоброзования даных в число испульзуется функция:

a)

string()

b)

print()

c)

input()

d)

int()

25.

Для преоброзования даных в текст используется функция:

a)

string()

b)

input()

c)

print()

d)

int()

26.

Для развлетвения используется:

a)

if

b)

while

c)

for

d)

def

27.

Перед названием функции должно быть:

a)

def

b)

for

c)

if

d)

while

28.

Для цикла используют:

a)

if

b)

while

c)

def

d)

class

29.

Для создания класса используют ключевое слово:

a)

for

b)

class

c)

if

d)

while

30.

> – это следующий знак:

a)

больше

b)

меньше

c)

больше или равно

d)

меньше или равно

31.

< – это следующий знак:

a)

больше

b)

меньше

c)

больше или равно

d)

меньше или равно

32.

Что будет выведено на экран?

a)

42 + 5

b)

42

c)

Mamkin hatzker!

d)

Rodion

33.

Символ переходан на новую строку

a)

\v

b)

\t

c)

\n

d)

\r

34.

Что будет выведено на экран?

a)

42 + 5

b)

42

c)

47

d)

5

35.

Что будет выведено на экран?

a)

You are a Rodion! I don't know you!

b)

You are a stranger! I don't know you!

c)

Hello, Kyrylo!

d)

Hello, Rodion!

36.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
37.
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
38.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
39.
The number or word we give to a variable
a)
Value
b)
Bug
c)
Information
d)
Text
40.
The correct way to write a variable in Python?
a)
my_variable = 10
b)
my variable = 10
c)
my_variable is 10
d)
my_variable: 10
41.
A location in memory used to store data that can be changed.
a)
Constant
b)
Value
c)
Variable
d)
Iteration
42.
What is the position of the name "Robert" in the following list:
a)
0
b)
1
c)
2
d)
3
43.
What does the APPEND procedure do in the following code:
a)
Adds Liverpool to the beginning of the list
b)
Replaces Bristol with Liverpool
c)
Replaces Manchester with Liverpool
d)
Adds Liverpool to the end of the list
44.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
45.
What output will this code produce?
a)
4
b)
2
c)
3
d)
5
46.
What output will this code produce?
a)
3
b)
20
c)
25
d)
17
47.
What output will this code produce?
a)
1
b)
3
c)
2
d)
4
48.
What letter will be printed on the screen after running this code:
a)
e
b)
x
c)
t
d)
Nothing prints
49.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
50.

What is the Python built-in function used to display numbers and text on the screen?

a)

print

b)

input

c)

output

d)

command

51.

Each item in a list has an index. What is the first index in a Python list?

a)

0

b)

1

c)

a

d)

A

52.

What will the output be from the following Python code?

Print("Hello world!")

a)

NameError

b)

Hello world!

c)

"Hello world"

d)

Print(Hello world!)

53.

What is the Python built-in function to converts a number to a string?

a)

str()

b)

int()

c)

parseInt()

d)

convert

54.

What will the output be from the following Python code?

print(Hello world!)

a)

Hello world!

b)

SyntaxError

c)

Hello world

d)

print(Hello world!)

55.

What will the output be from the following Python code?

print(9/3)

a)

3

b)

3.0

c)

9/3

d)

SyntaxError

56.

Which of these is correct Python conditional statement?

a)

IF answer == "Yes":

b)

if answer == "Yes"

c)

if answer == "Yes":

d)

if answer = "yes":

57.

What will the output be from the following code?

print(3+4)

a)

3+4

b)

7

c)

SyntaxError

d)

print(3+4)

58.

If you want to create an empty list called colours in Python, which of the following is correct?

a)

colours = [ ]

b)

colours = ( )

c)

colours = { }

d)

colours = <>

59.
What is the correct definition of an algorithm?
a)
An algorithm is a step by step instructions to solve a problem.
b)
An algorithm is a process of baking bread.
c)
An algorithm is a software used to compute numbers.
d)
An algorithm is the process of breaking problems.
60.

What sort of robot is this?

a)

Humanoid

b)

Non Humanoid

61.

What sort of robot is this?

a)

Humanoid

b)

Non Humanoid

62.

Which of the following are advantages of using robots?

a)

They don’t get tired

b)

They don’t need to be paid

c)

They don't need electricity

d)

They can adapt to change

63.

Which of the following are advantages of using humans?

a)

They don’t get tired

b)

They don’t need to be paid

c)

They don't need electricity

d)

They can adapt to change

64.

Which flowchart shape is this?

a)

Decision Box

b)

Input / Output box

c)

Process box

d)

Start / Stop box

65.

Which flowchart shape is this?

a)

Decision Box

b)

Input / Output box

c)

Process box

d)

Start / Stop box

66.

Which flowchart shape is this?

a)

Decision Box

b)

Input / Output box

c)

Process box

d)

Start / Stop box

67.

Which flowchart shape is this?

a)

Decision Box

b)

Input / Output box

c)

Process box

d)

Start / Stop box

68.

What is an algorithm?

a)

a step by step set of instructions

b)

a musical instrument

c)

a programming language

d)

a piece of hardware

69.

a sensor which detects if a robot has collided with another object

a)

proximity sensor

b)

bumper

c)

light sensor

d)

temperature sensor

70.

a sensor which measures how hot or cold something is

a)

proximity sensor

b)

bumper

c)

light sensor

d)

temperature sensor

71.

a sensor which measures how bright or dark it is

a)

proximity sensor

b)

bumper

c)

light sensor

d)

temperature sensor

72.

Robots and computer systems are useful for doing ....

a)

boring, repetitive and dangerous tasks

b)

creative, problem solving tasks and being able to think for themselves

73.

humans are better at doing ....

a)

boring, repetitive and dangerous tasks

b)

creative, problem solving tasks and being able to think for themselves

74.

AN algorithm is a sequence of instructions

a)

True

b)

False

75.

AN algorithm is a sequence of instructions that needs to be in the right order

a)

True

b)

False

76.

An algorithm is a sequence of instructions that needs to be in the right order and it needs to be ......

a)

short

b)

precise

c)

complicated

d)

written in English

77.

AN algorithm needs to be precise to ensure there are no errors.

a)

True

b)

False

78.

An algorithm is used to create a _____________________ such as a game or an application.

a)

application

b)

sequence

c)

instruction

d)

program

79.
What is this operator? +
a)
addition
b)
subtraction
c)
multiplication
d)
division
80.
What is this operator? -
a)
addition
b)
subtraction
c)
multilplication
d)
division
81.
What is this operator? *
a)
addition
b)

subtraction

c)
multiplication
d)
division
82.
What is this operator? /
a)
addition
b)
subtraction
c)
remainder
d)
division - only the whole number
83.
What is this operator? =
a)
Equal to
b)
Used in a calculation for equals
c)
and
d)
or
84.
What is this operator? >
a)
Greater than
b)
Less than or equal to
c)
Less than
d)
Greater than or equal to
85.
What is this operator? <
a)
Greater than
b)
Less than or equal to
c)
Less than
d)
Greater than or equal to
86.
What is this operator? >=
a)
Greater than
b)
Less than or equal to
c)
Less than
d)
Greater than or equal to
87.
What is this operator? <=
a)
Greater than
b)

Less than or equal to

c)
Less than
d)
Greater than or equal to
88.
What is this operator? %
a)
Concatenation
b)
Remainder or mod
c)
Division - only the whole number
d)
Escape character
89.
What is this operator? &&
a)
and
b)
or
c)
Remainder or mod
d)
Multiplication
90.
What is this operator? ||
a)
and
b)
or
c)
Remainder or mod
d)
Division
91.
What is this operator? ==
a)
Equal to
b)
Used in a calculation for equals
c)
and
d)
or
92.
What is this operator? !
a)
and
b)
or
c)
not
d)
equal to