Top Python Quiz Questions 🐍
1.69K subscribers
81 photos
4 links
🎓🔥💾 If you want to acquire a solid foundation in Python and/or your goal is to prepare for the exam, this channel is definitely for you.
🤳Feel free to contact us - @topProQ
And if you are interested in Java https://t.me/topJavaQuizQuestions
Download Telegram
Code snippet:
func = lambda x: return x
print(func(2))
What is the output of the code snippet above?
Anonymous Quiz
4%
0
22%
2.0
38%
2
7%
x
29%
SyntaxError
Code snippet:
from numbers import Number
from decimal import Decimal
from fractions import Fraction

print(isinstance(2.0, Number), end = ' ')
print(isinstance(Decimal('2.0'), Number), end = ' ')
print(isinstance(Fraction(2, 1), Number), end = ' ')
print(isinstance("2", Number), end = ' ')
Code snippet:
x = ['ab', 'cd']
for i in x:
i.upper()
print(x)
Code snippet:
from functools import reduce
numbers = [1, 2, 3]
reduce(lambda x, y: x + y, numbers)
Code snippet:
x=1
def cg():
global x
x=x+1
cg()
x
Code snippet:
def foo(k):
k = [1]
q = [0]
foo(q)
print(q)
Code snippet:
print("abc DEF".capitalize())
Code snippet:
class A:
@staticmethod
def a(x):
print(x)
A.a(100)
Code snippet:
def foo(k):
k = [1]

q = [0]
foo(q)
print(q)