Python MCQs with answers Page - 19

Here, you will find a collection of MCQ questions on Python. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 831.35K Points
Coach

Q. Which of the following cannot be a variable?

  • (A) __init__
  • (B) on
  • (C) it
  • (D) in

A

Admin • 831.35K Points
Coach

Q. Which of the following is an invalid statement?

  • (A) abc = 1,000,000
  • (B) a,b,c = 1000, 2000, 3000
  • (C) a b c = 1000 2000 3000
  • (D) a_b_c = 1,000,000

A

Admin • 831.35K Points
Coach

Q. Which of the following is not a keyword?

  • (A) eval
  • (B) assert
  • (C) nonlocal
  • (D) pass

A

Admin • 831.35K Points
Coach

Q. Why are local variable names beginning with an underscore discouraged?

  • (A) they confuse the interpreter
  • (B) they are used to indicate global variables
  • (C) they are used to indicate a private variables of a class
  • (D) they slow down execution

A

Admin • 831.35K Points
Coach

Q. Which is the correct operator for power(x to y)?

  • (A) X^y
  • (B) X**y
  • (C) X^^y
  • (D) None

A

Admin • 831.35K Points
Coach

Q. Which one of these is floor division?

  • (A) /
  • (B) %
  • (C) //
  • (D) *

A

Admin • 831.35K Points
Coach

Q. What is the order of precedence in python?
i) Parentheses
ii) Exponential
iii) Multiplication
iv) Division
v) Addition
vi) Subtraction

  • (A) i,ii,iii,iv,v,vi
  • (B) ii,i,iii,iv,v,vi
  • (C) ii,i,iv,iii,v,vi
  • (D) i,ii,iii,iv,vi,v

A

Admin • 831.35K Points
Coach

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

  • (A) 1
  • (B) 0
  • (C) 5
  • (D) 7

A

Admin • 831.35K Points
Coach

Q. Mathematical operations can be performed on a string.

  • (A) True
  • (B) False
  • (C) ---
  • (D) ---

A

Admin • 831.35K Points
Coach

Q. Operators with the same precedence are evaluated in which manner?

  • (A) Left to Right
  • (B) Right to Left
  • (C) Can’t say
  • (D) None

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ