wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PYTHON JUNIOR QUIZ-3

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which is the logical operator in python?

a)

and

b)

&&

c)

&

d)

<<

2.

Which operator has the highest precedence in python?

a)

*

b)

**

c)

$

d)

@

3.

What is the output?

print(100 or 2 or 40)

a)

2

b)

True

c)

100

d)

40

4.

What is the output?

print("hi"**5)

a)

hi

b)

hi 5 times

c)

hi hi

d)

error

5.

Which is used for conditions?

a)

if

b)

if-else

c)

elif

d)

all

6.

How do identify block in python?

a)

Indentation

b)

{ and }

c)

[ and ]

d)

( and )

7.

If there are multiple conditions, which is best?

a)

simple if

b)

if else

c)

elif ladder

d)

nested if

8.

Which keyword is used for empty block?

a)

if

b)

for

c)

pass

d)

empty

9.

When one condition depends on the another condition,which type of if required?

a)

simple if

b)

if else

c)

elif ladder

d)

nested if

10.

What is the output?

if(True):

print("if")

a)

True

b)

if

c)

None

d)

Error