Logo

Python Questions Set 159:

Quiz Mode

Which of the following cannot be a variable? 

1
2
3
4

Solution:

Which operator is called the Walrus operator in Python 3.8?

1
2
3
4

Solution:

Find the output of the following code:


x = 23

x = x == x

print(x)

1
2
3
4

Solution:

What is the output of the given code?


cube=lambda x:x*x*x

print(cube(12))

1
2
3
4

Solution:

 

What is the output of the following code?


for i in [1, 0]:
 print(i+1)

1
2
3
4

Solution:

What is the output of the following Python code?


print("Hello", "world", "welcome", "to", "Abekus", sep="-")

1
2
3

Solution:

 

What will be the output of the following Python function, assuming that the random module has already been imported?


random.uniform(3,4)

1
2
3
4

Solution:

 

What Is The Output Of The Following Code Snippet?

text = 'Welcome to the world of Python'
words = text.split()
length = list(map(lambda word: len(word), words))
print (length)

1
2
3
4

Solution:

  What does single-level inheritance mean? 

1
2
3
4

Solution:

What will be the output of the following code?

a = 10
b = 2
try:
c = a // b
except ZeroDivisionError as e:
print("Error =", e)
except TypeError as e:
print("Error =", e)
finally:
print("Welcome to ABEKUS")
print("Result =", c)

1
2
3
4

Solution: