Commerce

Variable Names And Operators MCQs

Practice Variable Names And Operators MCQs for competitive exams.

Variable Names And Operators MCQs

Practice questions from this topic.

What is the result of round(3.75) ?

  1. A. 3
  2. B. 3.75
  3. C. 4
  4. D. 3.5
Report Error

What is the purpose of the modulo operator (%) in Python?

  1. A. Finding the exponent
  2. B. Multiplying numbers
  3. C. Calculating the square root
  4. D. Calculating the remainder
Report Error

What is the result of 10 / 2 ?

  1. A. 5.0
  2. B. 5
  3. C. 2
  4. D. 0.5
Report Error

The expression Int(x) implies that the variable x is converted to integer.

  1. A. True
  2. B. False
Report Error

What is the order of precedence for the arithmetic operators in Python?

  1. A. +, *, /, -
  2. B. /, *, +, -
  3. C. *, /, +, -
  4. D. +, -, *, /
Report Error

What is the result of the expression 7 % 3 ?

  1. A. 2.33
  2. B. 2
  3. C. 0.333
  4. D. 1
Report Error

What is the result of len("python") ?

  1. A. 6
  2. B. 5
  3. C. 7
  4. D. "python"
Report Error

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

  1. A. 7
  2. B. 1
  3. C. 0
  4. D. 5
Report Error

Operators with the same precedence are evaluated in which manner?

  1. A. Left to Right
  2. B. Right to Left
  3. C. Can't say
  4. D. None of the mentioned
Report Error

Which is the correct operator for power(xy)?

  1. A. X^y
  2. B. X**y
  3. C. X^^y
  4. D. None of the mentioned
Report Error

What does the '//' operator do when used with negative numbers?

  1. A. Returns the positive quotient
  2. B. Returns the negative quotient
  3. C. Rounds down to the nearest integer
  4. D. Rounds up to the nearest integer
Report Error

What is the result of "Hello" in "Hello, World!" ?

  1. A. True
  2. B. False
  3. C. None
  4. D. Error
Report Error