wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

grade 10 A

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

1. Which of the following is a correct variable name in Python?

a)

A) my-var

b)

B) 2ndVar

c)

C) my_variable

d)

D) variable name

2.

2. What is the output of the following code ?

print("Hello" + "World")

a)

A) Hello World

b)

B) HelloWorld

c)

C) Hello+World

d)

D) Error

3.

3. Which symbol is used for single-line comments in Python?

a)

A) //

b)

B) #

c)

C) /*

d)

D) --

4.

5. What is the result of the expression 3 *2 ** 3 in Python?

a)

A) 24

b)

B) 64

c)

C) 48

d)

D) 27

5.

What is the output of the following code snippet?

print(10 // 3)

a)

A) 3

b)

B) 3.33

c)

C) 3.0

d)

D) 10/3

6.

10. Which operator is used for exponentiation in Python?

a)

A) ^

b)

B) **

c)

C) %

d)

D) //

7.

what is the data type of the result of 3 / 2?

a)

A) int

b)

B) float

c)

C) str

d)

D) error

8.

Which of the following is the correct way to write a comment in Python?

a)

A) // This is a comment

b)

B) /* This is a comment */

c)

C) # This is a comment

d)

D) -- This is a comment

9.

+, -, *,/ are ........operators

a)

arithmetic

b)

relational

c)

comparison

d)

Assignment

10.

python is used for......

a)

web development

b)

software development

c)

system scripting.


d)

all the previous