Python MCQ

Python MCQ

  • Sharad Jaiswal
  • 22nd Nov, 2021

We have listed here the best Python MCQ Questions for your basic knowledge of the Python Language. This Python MCQ Test contains 25+ Python Multiple Choice Questions. You have to select the right answer to every question to check your final preparation for the Python MCQ Interview or Exams.

Practice Python MCQ Questions;

1) Who is created Python

  • A. Tom Cruise
  • B.James Gosling
  • C.Denis Ritchie
  • D.Guido Van Rossum

2) In which language is Python written?

  • A. PHP
  • B.JAVA
  • C.C
  • D.None of the above

3) Python in which year release Publicly?

  • A. 1990
  • B.1991
  • C.1992
  • D.1993

4) Which of the following symbols are used for comments in python?

  • A. /**/
  • B.//
  • C.**
  • D.#

5) Where is function defined?

  • A. class
  • B.Another Function
  • C.Module
  • D.All of the above

6) Which keyword is use for function?

  • A. def
  • B.define
  • C.fun
  • D.function

7) Which of the following precedance?

  • A. ()
  • B.""
  • C.::
  • D.<>

8) Is Python code compiled or interpreted?

  • A. Python code is only compiled
  • B.Python code is only interpreted
  • C.Python code is neither compiled nor interpreted
  • D.Both A & B

9) Function converts a string to all uppercase?

  • A. uppercase()
  • B.upper()
  • C.upper.case()
  • D.None of the above

10) What is the type of inf?

  • A. Integer
  • B.Float
  • C.Boolean
  • D.Complex

11) What will be the output of 7^10 in python?

  • A. 70
  • B.21
  • C.13
  • D.700

12) Select the reserved keyword in python.

  • A. import
  • B.continue
  • C.continue
  • D.All of the above

13) Which one of the following is not a python's predefined data type?

  • A. String
  • B.Class
  • C.return
  • D.All of the above

14) Python allows string slicing?

  • A. slice() Constructor
  • B.Extending Indexing
  • C.Both A and B
  • D.none of the above

15) Mathematical operations can be performed on a string, Where True or False

  • A. True
  • B.False

16) which one of the following has the highest precedence in the expression?

  • A. float
  • B.String
  • C.Parentheses
  • D.List

17) which one of the following has the highest precedence in the expression?

  • A. float
  • B.String
  • C.Parentheses
  • D.List

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

  • A. Indentation
  • B.List
  • C.Classes
  • D.entities

19) The Format Function, when applied on a string returns;

  • A. int
  • B.str
  • C.bool
  • D.llist

20) 19% 2 in Python

  • A. 1
  • B.2
  • C.9
  • D.38

21) Python allows string slicing. what is the output of below code: s='cppbuzz chicago' print(s[3:5])

  • A. bu
  • B.pbuzz
  • C.buzzc
  • D.None of the above

22) What is the best definition of a script in python?

  • A. The Python script is basically a file containing code written in Python
  • B.The script is basically a file containing images in python.
  • C.The Python script is basically a folder containing code in python.
  • D.None of the above

23) 19 % 2 in python is

  • A. 1
  • B.9
  • C.9.5
  • D.None of the above

24) Which of the following keywords mark the beginning of class definition?

  • A. def
  • B.class
  • C.return
  • D.None of the above

25) Identify the words which best describes python?

  • A. flexible
  • B.reliable
  • C.robust & Simple
  • D.All of the above

26) What is the return type of function id?

  • A. int
  • B.dict
  • C.bool
  • D.float

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Nov
JSF MCQ
01st
Nov
Ajax MCQ