Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Basic

Total questions: 12

Worksheet time: 11mins

Name
Class
Date
1.

What is Python ?

a)

Python is text-based programming

b)

Python is a kind of snake

c)

Python is block-based programming

d)

Python is human language

2.

What is the result of not(true or false) ?

a)

true

b)

false

3.

What is the difference between 10 / 3 and 10 // 3 ?

a)

10 / 3 is division. 10 // 3 is subtraction.

b)

10 / 3 is floor division. 10 // 3 is subtraction.

c)

10 / 3 is floor division. 10 // 3 is division.

d)

10 / 3 is division. 10 // 3 is floor division.

4.

Assignment Operator is ...

a)

used to assign values to variables

b)

and, or, not

c)

+, -, %

d)

+=, <<=, %=

e)

==, <=, !=

5.

Is this code true or false?

number = int(input("Input your number:"))

if number % 3 == 0:

if number % 5 == 0:

print ("FizzBuzz")

else:

print("Fizz")

elif number % 5 == 0:

print("Buzz")

else:

print(number)

a)

True

b)

False

6.

How many errors in this image?

a)

1

b)

2

c)

3

d)

4

7.

What line is error?

a)

4

b)

5

c)

6

d)

7

e)

8

8.

What is the result of 10 == “10”? and Why?

a)

False. Cause 10 is integer & "10" is string

b)

True. Cause 10 == "10" is same integer.

9.

How many Python divides the operators ?

a)

4

b)

5

c)

6

d)

7

10.

What is operator?

a)

someone who operates equipment or a machine

b)

special symbol that carry out arithmetic or logical computation

c)

someone that engages in or runs a business

11.

Given (x = 100), what will be the value of after we run (x //= 3)?

a)

34

b)

33.33

c)

33

12.

Python Data Types :

a)

Text type : str

b)

Numeric type : int, float, double

c)

Text type : string

d)

Numeric type : int, float, complex