Contents

In which year was the Python 3.0 version developed?
a) 2008                                 
b) 2000
c) 2010                                 
d) 2005

a

Explanation: Python 3.0 version was developed on December 3, 2008.


What do we use to define a block of code in Python language?
a) Key                                   
b) Brackets
c) Indentation     
d) None of these

c

Explanation:  Python uses indentation to define blocks of code. Indentations are simply spaces or tabs used as an indicator that is part of the indent code child. As used in curly braces C, C++, and Java.


Which character is used in Python to make a single line comment?
a) /                                                         
b) //
c) #                                                        
d) !

c

Explanation:  "#" character is used in Python to make a single-line comment.


Which of the following statements is correct regarding the object-oriented programming concept in Python?
a) Classes are real-world entities while objects are not real
b) Objects are real-world entities while classes are not real
c) Both objects and classes are real-world entities
d) All of the above

b

What is the method inside the class in python language?
a) Object                                              
b) Function
c) Attribute                           
d) Argument

b

Explanation: Function is also known as the method.


Which of the following declarations is incorrect?
a) _x = 2                                               
b) __x = 3
c) __xyz__ = 5    
d) None of these

d

Explanation: All declarations will execute successfully but at the expense of low readability.