WorksheetsPython Quiz
Total questions: 20
Worksheet time: 20mins
What is the maximum possible length of an identifier?
16
32
64
None of these above
Who developed the Python language?
Zim Den
Guido van Rossum
Niene Stom
Wick van Rossum
In which year was the Python language developed?
1995
1972
1981
1991
In which language is Python written?
English
PHP
C
All of the above
What do we use to define a block of code in Python language?
Key
Brackets
Indentation
None of these
Which 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?
Classes are real-world entities while objects are not real
Objects are real-world entities while classes are not real
Both objects and classes are real-world entities
All of the above
What is the method inside the class in python language?
Object
Function
Attribute
Argument
Which of the following declarations is incorrect?
_x = 2
__x = 3
__xyz__ = 5
5x=9
Why does the name of local variables start with an underscore discouraged?
To identify the variable
It confuses the interpreter
It indicates a private variable of a class
None of these
Which of the following is not a keyword in Python language?
val
raise
try
with
Which of the following statements is correct for variable names in Python language?
All variable names must begin with an underscore.
Unlimited length
The variable name length is a maximum of 2.
All of the above
Which of the following declarations is incorrect in python language?
xyzp = 5,000,000
x y z p = 5000 6000 7000 8000
x,y,z,p = 5000, 6000, 7000, 8000
x_y_z_p = 5,000,000
Which of the following words cannot be a variable in python language?
_val
val
try
_try_
Which of the following operators is the correct option for power(ab)?
a ^ b
a**b
a ^ ^ b
a ^ * b
Which of the following precedence order is correct in Python?
Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
Exponential, Parentheses, Multiplication, Division, Addition, Subtraction
Which one of the following has the same precedence level?
Division, Power, Multiplication, Addition and Subtraction
Division and Multiplication
Subtraction and Division
Power and Division
Which of the following functions is a built-in function in python language?
val()
print()
None of these
Study the following function:
round(4.576)
What will be the output of this function?
4
5
576
6
Which of the following is correctly evaluated for this function?
pow(x,y,z)
(x**y) / z
(x / y) * z
(x**y) % z
(x / y) / z
