Python MCQs with answers Page - 89

Dear candidates you will find MCQ questions of Python here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

V

Vijay Sangwan • 28.62K Points
Instructor II

Q. Which function is used to get the length of a string in Python?

  • (A) length()
  • (B) len()
  • (C) size()
  • (D) count()

V

Vikash Gupta • 33.56K Points
Instructor I

Q. Which of the following operators is used for exponentiation in Python?

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

G

Gopal Sharma • 38.32K Points
Coach

Q. What is the correct way to import the math module in Python?

  • (A) import math
  • (B) import math()
  • (C) import math as m
  • (D) import m = math

R

Rakesh Kumar • 28.44K Points
Instructor II

Q. What is the output of the following Python code: print('Python'.lower())?

  • (A) python
  • (B) PYTHON
  • (C) Python
  • (D) Error

A

Admin • 36.96K Points
Coach

Q. Which of the following is used to define a comment in Python?

  • (A) //
  • (B) #
  • (C) /* */
  • (D) --

G

Gopal Sharma • 38.32K Points
Coach

Q. Which of the following data types is mutable in Python?

  • (A) Tuple
  • (B) Set
  • (C) String
  • (D) Integer

G

Gopal Sharma • 38.32K Points
Coach

Q. How do you declare a variable in Python?

  • (A) variable_name = value
  • (B) value = variable_name
  • (C) var variable_name = value
  • (D) declare variable_name as value

V

Vijay Sangwan • 28.62K Points
Instructor II

Q. What does the 'continue' statement do in a loop in Python?

  • (A) Exits the loop
  • (B) Skips the current iteration and moves to the next iteration
  • (C) Pauses the loop
  • (D) Starts a new loop

R

Ranjeet • 34.60K Points
Instructor I

Q. What will be the output of the following code: print(3 // 2)?

  • (A) 1.5
  • (B) 1
  • (C) 2
  • (D) Error

R

Ram Sharma • 193.86K Points
Coach

Q. Which of the following is the correct syntax for handling exceptions in Python?

  • (A) try: except: finally:
  • (B) try: catch: finally:
  • (C) catch: try: finally:
  • (D) try: error: finally:

Be the first to start discuss.

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.

Image

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.