wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Lesson 7 - Test 1

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

How many keywords are there in python 3.7?

a)

30

b)

31

c)

32

d)

33

2.

All keyword in python are in

a)

lowercase

b)

uppercase

c)

mix up both

d)

none

3.

Which of the following statement is False?

a)

Variable names can be arbitrarily long.

b)

They can contain both letters and numbers.

c)

Variable name can begin with underscore.

d)

Variable name can begin with number.

4.

Which of the following is a valid variable?

a)

var@

b)

32var

c)

class

d)

abc_a_c

5.

Which of these are keyword?

a)

in

b)

is

c)

assert

d)

all of the above

6.

What is the output of the following code : print 5//2

a)

2

b)

2.5

c)

2.0

d)

none

7.

Which is the correct operator for power(xy)?

a)

X^y

b)

X**y

c)

X^^y

d)

None of the mentioned

8.

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

a)

7

b)

1

c)

0

d)

5

9.

Can we change the background color of output window in turtle graphics ?

a)

no

b)

yes

c)

can't say

d)

none

10.

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

a)

27

b)

9

c)

3

d)

1

11.

Which function is used for changing pointer shape ?

a)

shape()

b)

design()

c)

turtle()

d)

size()

12.

What does ~~~~~~5 evaluate to?

a)

+5

b)

-5

c)

+11

d)

-11

13.

What does 3 ^ 4 evaluate to?

a)

81

b)

12

c)

0.75

d)

7

14.

Which of the following Boolean expressions is not logically equivalent to the other three?

a)

not(-6<0 or-6>10)

b)

-6>=0 and -6<=10

c)

not(-6<10 or-6==10)

d)

not(-6>10 or-6==10)

15.

What will be the output of the following Python code snippet?

not(10<20) and not(10>30)

a)

True

b)

False

c)

Error

d)

no output