wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Test 1

Total questions: 10

Worksheet time: 26mins

Name
Class
Date
1.

To output the result, we need to use print() function.

a)

True

b)

False

2.

Write a Python code to output the results as shown

4 lines
3.

Write a Python code to output the results as shown (Hints: separator)

4 lines
4.

In programming, variables work like containers to hold important stuff used in your code

a)

True

b)

False

5.

When naming a variable, the name can consists of.....

a)

Lower capital

b)

Upper capital

c)

Any special characters

d)

Cannot start with a digit

6.

Which of the variable name below is usable?

a)

Assassins123

b)

1Malaysia

c)

Han_Chiang

d)

Percentage%

7.

Which of the following data types used in Python?

a)

Words

b)

Boolean

c)

Strings

d)

Integers

8.

To accept user input, we need to use input() function.

a)

True

b)

False

9.

Write a code to ask for user input about their birthplace

4 lines
10.

Write a Python code to accept user input and output the results as shown

4 lines