wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Year 8 Python

Total questions: 10

Worksheet time: 12mins

Name
Class
Date
1.

which of these are a correct print statement

a)

Print("Computer science")

b)

prit ("Computer science")

c)

print (Computer science")

d)

print ("Computer science")

2.

Which of these is suitable for a variable name

a)

x = '4hello'

b)

x = 'hello there'

c)

x = 'hello'

d)

x = hello there

3.

which of the statements below will print properly?

x = 6

y = "I am"

a)

print (y , x)

b)

print ((int(y) , x)

c)

print (y, (str(x))

d)

print (y , (int(x))

4.

I am used multiple times in a program; I can be changed and stored in memory. I am a ? ONE WORD ANSWER.

(a)  

5.

I am a data type. I can be a mix of letters and numbers/special characters. I am a ? ONE WORD ANSWER.

(a)  

6.

I am a data type. I am used to complete maths problems. what am I ? ONE WORD ANSWER

(a)  

7.

Which line in this program is incorrect?


if 6 > 8:

print ("Correct")

else

print ("Incorrect")

a)

Line 1

b)

Line 2

c)

Line 3

d)

Line 4

8.

Which line in this program is incorrect?


if 9 > 8:

Print ("Correct")

else:

print ("Incorrect")

a)

Line 1

b)

Line 2

c)

Line 3

d)

Line 4

9.

Which line in this program is incorrect?


if dog == cat:

print ("Correct")

else:

print (Incorrect)

a)

Line 1

b)

Line 2

c)

Line 3

d)

Line 4

10.

Which line in this program is incorrect?


if dog = cat:

print ("Correct")

else:

print ("Incorrect")

a)

Line 1

b)

Line 2

c)

Line 3

d)

Line 4