Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python 01

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is a variable?

a)

Something to store Data

b)

Math operator

c)

A bug

d)

Something that cannot be changed

2.

What can this do?

input()

a)

Allow code to run faster

b)

Allow user to be able to enter something

c)

Used to debug a code

d)

The last line of the code

3.

Which ARE not allowed for variables naming? (Choose 2!)

a)

Lowercase

b)

Uppercase

c)

Starts with numbers

d)

Have space in between

4.

True or False?

Python is case sensitive

a)

True

b)

False

5.

What is a data type that can only be true or false?

a)

boolean

b)

int

c)

string

d)

float

6.

Print the word: python

a)

print("python")

b)

print(python)

c)

output("python")

d)

_python

7.

Print the total for 5 add 5

a)

print(5+5)

b)

print(five + five)

c)

print(sum(5))

d)

print("5"+"5")

8.

This is a comment


Hide the comment above. Which one do you use?

a)

#

b)

/*

c)

<!---

d)

<hide>

9.

print("5"+"5")

a)

10

b)

55

c)

Error

d)

5

10.

print(5+"5")

a)

Error

b)

55

c)

10

d)

5"5"

11.

What is another way of writing the following code?

score = score + 1

a)

score += 1

b)

score.add(1)

c)

score + 1

d)

score + score

12.

a != b

a)

a is not equal b

b)

a is equal b

c)

a is less than b

d)

a is nearly equal b

13.

Which of the following symbol is used to mean "Equal to" in a comparison?

a)

=

b)

!=

c)

==

d)

>=

14.

If you want to test more than one condition, what do you use after an if statement

a)

elif

b)

print

c)

ifif

d)

else if

15.

What Python command is used to mean "all other conditions"?

a)

if

b)

else

c)

for

d)

input