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.

Which of the following is an invalid statement?

  1. A. abc = 1,000,000
  2. B. a b c = 1000 2000 3000
  3. C. a,b,c = 1000, 2000, 3000
  4. D. a_b_c = 1,000,000
Report Error

What does the != operator mean in Python?

  1. A. Not Found
  2. B. Not True
  3. C. Not Equal
  4. D. No Function
Report Error

What is the output of print("Hello" + " " + "World") ?

  1. A. "Hello World"
  2. B. "hello world"
  3. C. "Hello+World"
  4. D. "Hello" " " "World"
Report Error

Which one of these is floor division?

  1. A. /
  2. B. //
  3. C. %
  4. D. None of the mentioned
Report Error

Which operator is used to concatenate strings in Python?

  1. A. &
  2. B. +
  3. C. .
Report Error

Which one of the following has the highest precedence in the expression?

  1. A. Exponential
  2. B. Addition
  3. C. Multiplication
  4. D. Parentheses
Report Error

What is the result of 2 ** 3 ** 2 ?

  1. A. 64
  2. B. 512
  3. C. 18
  4. D. 81
Report Error

What is the type of the result when you add an integer and a floating-point number?

  1. A. Integer
  2. B. Floating-point
  3. C. String
  4. D. Boolean
Report Error

What is the value of x after the following code: x = 5; x += 3; ?

  1. A. 5
  2. B. 8
  3. C. 3
  4. D. 15
Report Error

What does the is operator test for?

  1. A. Equality of values
  2. B. Identity of objects
  3. C. Comparison of strings
  4. D. Inclusion in a list
Report Error

What is the result of 3 ** 2 ?

  1. A. 6
  2. B. 9
  3. C. 1
  4. D. 12
Report Error

Mathematical operations can be performed on a string.

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