1. Which of the following is not a keyword?

A) eval

B) nonlocal

C) pass

D) assert

Correct Answer: eval

Explanation : They are used to define the syntax and structure of the Python language. In Python, keywords are case sensitive. There are 33 keywords in Python 3.7


2. A namespace is a dictionary of variable names (keys) and their corresponding objects (values).

A) True

B) False

Correct Answer: True

Explanation : A namespace is a dictionary of variable names (keys) and their corresponding objects (values). - True


3. Which of the following are integer values-

A) 3.145

B) 41

C) "125"

D) None of the above

Correct Answer: 41

Explanation : 41 is integer value.


4. Which of the following is wrong?

A) x = 0b101

B) x = 03964

C) x = 19023

D) x = 0x4f5

Correct Answer: x = 03964


5. Which of the following is the correct extension of Python file?

A) .python

B) .pl

C) .p

D) .py

Correct Answer: .py

Explanation : .py is the correct extension of python file.


6. Which of the following character is used to give single-line comments in Python?

A) !

B) /*

C) #

D) //

Correct Answer: #

Explanation : # is used to give single-line comments in Python.


7. Variables can be removed using the del keyword.

A) True

B) False

Correct Answer: True

Explanation : Variables can be removed using the del keyword.- True


8. Python allows programming in Object-Oriented and Procedural paradigms.

A) True

B) False

Correct Answer: True

Explanation : Python allows programming in Object-Oriented and Procedural paradigms. - True


9. A variable name must begin with a letter or underscore character.

A) True

B) False

Correct Answer: True

Explanation : A variable name must begin with a letter or underscore character. - True


10. Booleans have two values: True or False.

A) True

B) False

Correct Answer: True

Explanation : Booleans have two values: True or False. - True


11. The type of inf is …….?

A) Boolean

B) Float

C) Complex

D) Integer

Correct Answer: Float

Explanation : The type of inf is Float.


12. Python 3.0 final was released

A) 1989

B) 2008

C) 2010

D) 1991

Correct Answer: 2008

Explanation : Python 3.0 final released was in 2008.


13. Which of the following cannot be used as identifiers?

A) Letters

B) Digits

C) Underscores

D) Spaces

Correct Answer: Spaces

Explanation : Spaces cannot be used as identifiers.


14. Which code does the compiler convert the Python source code?

A) Machine Code

B) System Code

C) Byte Code

D) Assembly Code

Correct Answer: Byte Code

Explanation : How does a compiler convert Python source code into Byte Code code.


15. Which is used to write block of code in Python?

A) Curly bracket

B) Square bracket

C) Indentation

D) All of the Above

Correct Answer: Indentation

Explanation : Indentation is used to write a block of code in Python.