PYTHON MCQ Questions and Answers in Hindi

Q. 1. Python was created by?
a. Denis Ritchie
b. Richard Stallman
c. Guido Van Rossum
d. Larry Page
Ans: c. Guido Van Rossum

Python language is designed by a Dutch programmer Guido van Rossum in the Netherlands.

Q. 2. Python is mostly used in
a. Web Development
b. Big Data and AI
c. Scientific Computing
d. All of above
Ans: d. All of above

Q. 3. Python is ____________ language
a. Interpreted
b. Complied
c. Both Interpreted and Compiled
d. None of the above
Ans: c. Both Interpreted and Compiled

Q. 4. Python Shell is basically a
a. Python Interpreter
b. Python Compiler
c. Python Debugger
d. Python Developer
Ans: a. Python Interpreter

Q. 5. Which of the following symbol indicates Python prompt in Python Shell
a. >
b. >>
c. >>>
d. >>>>
Ans: c. >>>

Q. 6. Using Python Interpreter one can execute python program in
a. Interactive mode
b. Script Mode
c. Both
d. None of the above
Ans: c. both Interpreted and Compiled

Q. 7. We can write and save python code in
a. Interactive mode
b. Script Mode
c. Both
d. None of the above
Ans: b. Script Mode

Q. 8. Select the correct statement
i. In interactive mode we can save python code for future use.
ii. Script mode is more convenient for testing single line code for instant execution
a. i true, ii false
b. i false, ii true
c. Both are true
d. Both are false

Ans: d. Both are false

Q. 9. A python program is called
a. Module
b. Package
b. Package
b. Package
Ans: a. Module

Q. 10. Python program files are stored with the extension of
a. .pt
b. .py
c. .pyt
d. .pty
Ans: b. py

Q. 11. In Python IDLE, IDLE abbreviates
a. Integrated Development and Linear Environment
b. Integrated Development and Learning Environment
c. International Development and Learning Environment
d. International Development and Linear Environment
Ans: b. Integrated Development and Learning Environment

Q. 12. Which of the following is NOT correct statement about Python?
a. Python is not case sensitive
b. Python is Interpreted language
c. Python dynamically typed language
d. Python is easy to read as it does not uses semicolon, brackets
Ans: a. Python is not case sensitive

Q. 13. Which is NOT true about Identifier (variable) naming conventions in python
a. Identifiers are system defined and Keywords are user defined
b. Identifiers only contains alphabets and Keyword can contain alphabets, digits or underscore
c. Identifiers identifies the name of entity and Keyword specify the type of entity
d. None of above
Ans: c. Identifiers identifies the name of entity and Keyword specify the type of entity

Q. 14. Which is NOT true about Identifier (variable) naming conventions in python
a. Identifier cannot start with a digit.
b. It can be of any length.
c. It should not be a keyword or reserved word
d. We can use any special symbols in identifiers.
Ans: b. It can be of any length.
d. We can use any special symbols in identifiers.

Q. 15 In Python, a single line comment starts with
a. a. //
b. /*
c. #
d. ##
Ans: c. #

Q. 16. Select the correct statement
i. in Python, Comments are not executed by interpreter.
ii. variables must always be assigned values before they are used in the program

a. i true, ii false
b. I false, ii true
c. Both are true
d. Both are false
Ans: c. Both are true

Q. 17. Which of the following is not a python keyword?
a. def
b. for
c. true
d. and
Ans: c. true

Q. 18. Select the correct statement to create new variables and assign specific values to them.

a. Acc name = Surya
b. Acc name = ‘Surya’
c. Acc_name = “Surya”
d. Acc_name =  Surya
Ans:
b. Acc name = ‘Surya’
c. Acc_name = “Surya”

Q. 19. Which of the following is correct variable name?
a. acc@no
b. acc no
c. acc_no
d. #acc_no
Ans: c. acc_no

Q. 20. Which of the following is incorrect variable name?

a. Roll_no
b. Roll-no
c. Rollno
d. Rollno1
Ans: b. Roll-no

Q. 21 Which of the following is invalid variable name?
a. _degree<
b. degree20
c. degree$
d. Degre
Ans: c. degree$

Q. 22. Which of the following is valid keyword?
a. do
b. elseif
c. false
d. break
Ans: d. break

Q. 23. the code which is used to add remark in the source code and have no effect when program is executed
a. statement
b. comment
c. block
d. data type
Ans: b. comment

Q. 24 In python, multiple line comment is written as
a. /*….*/
b. //….//
c. /#….#/
d. “”….””
Ans: c. /#….#/

Q. 25. Python uses __________ to define or highlight a block of code
a. parenthesis
b. braces
c. quotation
d. indentation
Ans: d. indentation

Leave a Reply

Your email address will not be published.