Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Day 1

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

What is the answer to this expression, 22%3 is

a)

7

b)

1

c)

0

d)

5

2.

Which is the correct operator for power  xyx^y  

a)

x^y

b)

x**y

c)

x^^y

d)

None of these

3.

Which one of theses is floor division

a)

/

b)

//

c)

%

d)

None of theses

4.

What is the order of precedence in Python?

i. Parenthesis

ii. Exponential

iii. Multiplication

iv. Division

v. Addition

vi. Subtraction

a)

i, ii, iii, iv, v, vi

b)

ii, i, iii, iv, v, vi

c)

ii, i, iv, iii, v, vi

d)

i, ii, iii, vi, v, iv

5.

Mathematical operations can be performed on a string

a)

True

b)

False

6.

Operators with same precedence are evaluated in which manner?

a)

Left to Right

b)

Right to Left

c)

Can't Say

d)

None of the mentioned

7.

What is the output of this expression, 3*1**3

a)

27

b)

9

c)

3

d)

1

8.

Which of the following is true for variable names in python?

a)

Unlimited Length

b)

all private members must have leading and trailing underscores

c)

underscores and ampersand are only two special characters allowed

d)

None of these

9.

Which of the following is an invalid variable?

a)

my_string_1

b)

1st_string

c)

foo

d)

-

10.

is Python case sensitive when dealing with identifiers?

a)

yes

b)

no

c)

machine dependent

d)

none of these