wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Y8 Term 3 Python recap

Total questions: 60

Worksheet time: 36mins

Name
Class
Date
1.
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.
2.

To display a text in Python you must use the next function:

a)

print()

b)

input()

c)

output()

d)

display()

3.

Which line of code is correct in Python?

a)

Print("Year8")

b)

print("Wrong!")

c)

print"(Correct!)"

d)

print"Buna!"

4.

In Python, \n

a)

creates a line return in a string of text

b)

creates a tab style indent in a string of text

c)

allows a backslash to appear in a string of text

d)

allows a speech mark to be used in a string of text

5.

Python variables are case sensitive. This means that

a)

they can be only word and letters

b)

capitals and lower case letters are treated differently

c)

they can be only letters and numbers

d)

they must start with a letter

6.

What is the output of the next program?

y="John"

y="Hi" + y

x=y+"!"

print (x)

a)

An error will appear, because x is a letter, and the correct function is print("x")

b)

HiJohn!

c)

Hi John !

d)

!

7.

v1=5

v2=10

v1=v1+v2

v2=v2+v1


What are the values of v1 and v2?

a)

15, 25

b)

5, 10

c)

15, 15

d)

Error

8.

What extension must you use to the end of the Python filename when saving it?

a)

.key

b)

.ppt

c)

.docx

d)

.py

9.

What does the term 'debug' mean?

a)

Finding algorithms

b)

Identifying errors and fixing them

c)

coding algorithms in Python

d)

Looking for a code

10.

What does 'syntax' mean?

a)

Describes an error or a bug

b)

Uses the 'print' and 'input' functions.

c)

The rules of a programming language

d)

The dictionary of a language

11.

What will the output be from the following code?

print("3+4")

a)

7

b)

34

c)

3+4

d)

SyntaxError

12.

What will the output be from the following code?

print(3+4)

a)

7

b)

34

c)

3+4

d)

SyntaxError

13.

Why do machines demonstrate artificial intelligence?

a)

Because machines are not really intelligent compare to humans.

b)

Because machines are capable of doing tasks for humans by programming them with a specific information.

c)

Because machines are useful and relevant in our daily lives.

d)

Because machines give you artificial information which are important.

14.

The following statements describe Artificial Intelligence EXCEPT

a)

AI is very useful in the present generation increasing its productivity.

b)

Al is a threat if mismanaged or used for bad intentions.

c)

AI replaces humans as it is more efficient than humans.

d)

All of the above

15.

Which of the following statements best describes the difference between robots and humans?

a)

Robots move differently and made up of metal.

b)

Robots do not have feelings and emotions as compared to humans.

c)

Robots are too smart as compared to humans.

d)

Robots are more effective than humans.

16.

What is A.I?

a)

Intelligence demonstrated by machines

b)

Smart robots

c)

Anthony Ian

d)

I don't know

17.

The term A.I is short for?

a)

Anatomy Insector

b)

Astrology Iselin

c)

Anh Intelligence

d)

Artificial Intelligence

e)

Antificial Intelligence

18.

Select movies that do NOT feature either robots or A.I.

a)

Avengers: Age Of Ultron

b)

The Terminator

c)

Iron Man 3

d)

Harry Potter

e)

Avengers: Infinity War

19.

Which one of these is not an area of AI?

a)

computer vision/image recognition

b)

voice recognition

c)

web design

d)

robotics

20.

What is AI used for?

a)

Healthcare

b)

Transportation

c)

Education

d)

All of the Above

21.
Who was this man?
a)
John von Neumann
b)
Donald Knuth
c)
Alan Turing
d)
Tim Berners-Lee
22.

Identify the bot in the picture.

a)

Sophia

b)

Asimo

c)

Swati

d)

sofil

23.
What did Alan Turing invent in WWII?
a)
A machine to decrypt enemy messages that were scrambled.
b)
A basic calculator that could add and subtract.
24.

The father of Computer science is considered to be

a)

John von Neumann

b)

Donald Trump

c)

Alan Turing

d)

Tim Berners-Lee

25.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
26.
What is Python?
a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
27.
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
28.
What will the output be from the following code?
print(3*4+5)
a)
27
b)
17
c)
12
d)
SyntaxError
29.

Which of the following is a Python command

a)

@echo off

b)

print ("")

c)

print "name"

d)

echo.

30.

In Python, to have text stated for the user to see, we use:

a)

" "

b)

% %

c)

( )

d)

? ?

31.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
32.
What button do you press to compile (run) your program so that it runs in the shell?
a)
F3
b)
F5
c)
F7
d)
F9
33.
What does INT means in python?
a)
Decimal Numbers
b)
Whole Number
c)
Text
d)
Floating Point Number
34.
What will the following code do? 
name = "Bob"
if name == "Bob": 
     print ("Hello " + name) 
else:  
     print ("I dont know you")
a)
prints bob
b)
prints Hello Bob
c)
nothing syntax error
d)
prints I don't know you
35.
What will be the output?
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
a)
Good moning 'Dave'
b)
Good morning Dave
c)
Good morning name
d)
Good morning + Dave
36.
A location in memory used to store data that can be changed.
a)
Constant
b)
Value
c)
Variable
d)
Iteration
37.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
38.
Which is the most appropriate data type for: "13th December"
a)
Float
b)
Boolean
c)
Integer
d)
String
39.
x = int(input("Enter a Number"))
print(X)
Why won't this work?
a)
Brackets are in the wrong place
b)
Print should have a capital letter
c)
It should have two equals
d)
both x variables should be lower case
40.

if you type print("4"+"9") what result would you get

a)

49

b)

13

c)

error

d)

0

41.

which of these are a correct print statement

a)

Print("Computer science")

b)

prit ("Computer science")

c)

print (Computer science")

d)

print ("Computer science")

42.

Find the Error within this code snippet

a)

Missing Brackets

b)

Missing Speech Marks

c)

Capital Letters for Function Name

d)

Spelling Mistakes

43.

Find the Error within this code snippet

a)

Missing Bracket

b)

Missing Speech Mark

c)

Capital Letters for Function Name

d)

Spelling Mistake

44.

How many errors are in this code snippet?

a)

1

b)

2

c)

3

d)

4

45.

What does INT stand for in Python

a)

Float (Decimal Numbers)

b)

String (Text)

c)

Boolean (True/False)

d)

Integer (Whole Numbers)

46.

What will be the output of print ("Theo_is_awesome")

a)

Theo sucks.

b)

theo_is_awesome

c)

Theo is awesome

d)

Theo_is_awesome

47.

Which variable data type is 'International School of Bucharest' an example of?

a)

String

b)

Integer

c)

Float

d)

Boolean

48.

If you type 6/2 what result would you get in python.

a)

3.2

b)

62

c)

3.0

d)

Error

49.

If you type 10/5 what result would you get in python?

a)

2

b)

2.0

c)

0

d)

15

50.

Which of the following is NOT a suitable variable name?

a)

num1

b)

Num1

c)

MyName

d)

My name

51.
Which is the most appropriate data type for: 34.9
a)
Float
b)
Boolean
c)
Integer
d)
String
52.
A data type consisting of numbers, letters and symbols.
a)
String
b)
Integer
c)
Float
d)
Boolean
53.
What will the output be from the following code?
print("Hello" + "world" + "today")
a)
Helloworldtoday
b)
Hello world today
c)
"Hello" "world" "today"
d)
SyntaxError
54.

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

a)

print

b)

input

c)

output

d)

command

55.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
56.

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!)

57.

What will the output be from the following Python code?

print(9/3)

a)

3

b)

3.0

c)

9/3

d)

SyntaxError

58.
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
59.

How do you define(assign) variables?

a)

var="String"

b)

func==Hello

c)

var : 123

d)

word= Hello

60.

What symbol is used in python to assign values to a variable?

a)

:

b)

*

c)

=

d)

==