VITyarthi Python Essentials Module 2 Quiz Answer

Question 1

What do we use to define a block of code in the Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these
 

3. Indentation

Question 2

Practice the following and enter the output – print(2.5+2.5)________________

5.0

Question 3

How to do string concatenation?

  1. +
  2. concatenate()
  3. concat()
  4. None

1. +

Question 4

What are the keywords used to represent boolean values in Python?

  1. TRUE
  2. FALSE
  3. Both
  4. None

 

4. None

Question 5

What is the output of the code? bool(-10)

  1. True
  2. False
  1. True

Question 6

What is the output of the code? bool(0)

  1. True
  2. False

2. False

Question 7

What is the output of the code? bool(10)

  1. True
  2. False
  1. True

Question 8

Say the variable is invalid?.

  1. _result
  2. Result is
  3. Result
  4. Result_1
  5. Result.ofthesum
  6. Both (B) and (E)

6. Both (B) and (E)

Question 9

What is the output of the following code? hours = 35.0 rate = 12.50 pay = hours * rate print (pay)

 

 

437.5

Question 10

You can use this template as a guide to the simple editor markdown and OLX markup to use for multiple choice problems. Edit this component to replace this template with your own assessment. >>Choose the best answer: x and y are ________ x *15 – y is ________

  1.  Terms, a group
  2. Operators, a statement
  3. Operands, an expression
  4. Operands, an equation

3. Operands, an expression

Question 11

Is Python case sensitive when we use identifiers?

  1. True
  2. False

 

  1. True

Question 12

Which of the following assignment operations is incorrect in the Python language?

  1. abcd = 3,000,000
  2. a b c d = 500 600 700 800
  3. x,y,z,p = 500, 600, 700, 800
  4. a_b_c_d = 3,000,000
 

2. a b c d = 500 600 700 800

Question 13

What is the output of the following code? x, y, z = “vityarthi”,”Python”, 2021 print(x,y,z)

 

vityarthi Python 2021

Question 14

What is the result of the following functions? min(100, -200, 400)

 

-200

Question 15

All keywords in Python are in

  1. UPPER CASE
  2. lower case
  3. Capitalized
  4. None of the mentioned
 

4. None of the mentioned

Question 16

What is the output? min(max(False,-3,-4), 2,7)

  1. -3
  2. -4
  3. False
  4. 2
 

3. False

Question 17

What is the result of the following functions? abs(-12.56)

 

12.56

Question 18

What is the result of the following functions? max(100, -1000, 40)

 

100

Question 19

What is the result of the following functions? min(100, -200, 400)

 

-200

Question 20

What is the result of the following functions? pow(34, 2)

 

1156

Question 21

What is the result of the following functions? round(156.651)

 

157

Question 22

What is the result of the following functions? sum([100, 200, 300])

600

Question 23

What is the purpose of comments?

  1. During debugging to identify issues
  2. To explain code
  3. Making the source code easier for others to understand
  4. All the above

4. All the above

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

Sharing Is Caring:

Leave a Comment