NEW
Font size
WorksheetsPython Quiz 1.4
Total questions: 12
Worksheet time: 6mins
What is the maximum possible length of an identifier?
16
32
64
None of These
Write the output of the given code
a=[10, 20]
b = a
b+= [30, 40]
print(a)
[10,20,30,40]
[10,20,[10,20,30,40]]
[10,20,30,40,[10,20]]
None of above
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 is not a keyword in Python language?
val
raise
try
with
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
Study the following function:
round(4.576)
What will be the output of this function?
4
5
576
5.0
Study the following function:
all([2,4,0,6])
What will be the output of this function?
False
True
0
Invalid code
import math
abs(math.sqrt(36))
What will be the output of this code?
Error
-6
6
6.0
a="technoindia"
print(a[5:-2])
What will be the output of this code?
oindi
oind
noind
noindi
What will be the output of this statement?
list1 = ['t', 'e', 'c', 'h', 'n', 'o']
print("-".join(list1))
t e c h n o
t-e-c-h-n-o
t e c h
[t-e-c-h-n-o]
