VITyarthi Python Essentials Module 3 Quiz Answer

Question 1

What is the output of 3?

  1. 3
  2. 30
  3. 10
  4. Error
  1. 3

Question 2

What is the output of 2**5?

  1. 32
  2. 25
  3. 4
  4. Error

 

  1. 32

Question 3

What is the output of the following statement? print(10-12/3+3*2-5 )

 

7.0

Question 4

What is the output of the following statement? print(8*4+4%5-3/2+16)

 

50.5

Question 5

What is the output of print(50/5)?

 

10.0

Question 6

What is the output of print(3%5)?

 

3

Question 7

What is the output of print(2.5*3.5)?

 

8.75

Question 8

What is the output of print(5%3)?

 

2

Question 9

What is the output of print(5//3)?

 

1

Question 10

What is the output of print(5**2)?

 

25

Question 11

What is the output of the following statement? print(2*3 + 4 % 15-3 // 12+6)

 

16

Question 12

What is the output of the following statement? print(2*3.5 + 4 % 15-3.6 // 12+6)

 

17.0

Question 13

Which of the following is not a boolean expression?

  1. True
  2. 3 == 4
  3. 3 + 4
  4. 3 + 4 == 7

 

3. 3 + 4

Question 14

What is the output of the following code? x = “5” y = 5 print(x == y)

  1. True
  2. False

 

  1. True

Question 15

What is the output of the following code? x = “5” y = 5 print(x == y)

  1. True
  2. False

 

  1. True

Question 16

What is the output of the following statement? print(-56 or (8 and 0) or -6)

-56

Question 17

What is the output of the following statement? print(not(-56 or (not 100) or -6))

  1. True
  2. False

 

2. False

Question 18

What is the output of the following code? a=”Python Programming” b=”Program” print(b in a)

  1. True
  2. False

 

  1. True

Question 19

In general, Mathematical operations can be performed on a string. Say True or False.

  1. True
  2. False

2. False

Question 20

Which of the following bitwise operators __ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.

  1. OR
  2. AND
  3. XOR
  4. NOT

3. XOR

Question 21

What is the output of the following code? print(20^45)

 

57

Question 22

What is the output of the following assignment operator(s)? a = 20 a -= 5 a *= 2 print(a)

  1. 30
  2. 10
  3. Syntax Error
  4. No error but no output too
  1. 30

Question 23

What will be the output of the following Python code if a=100 and b =200? a=100 b=200 a^=b b^=a a^=b print(a,b)

200 100

If you find anything wrong in this Answer Key, feel free to reach us in the comment section.

Sharing Is Caring:

Leave a Comment