What will be the output of the following Python code?
>>>max("what are you")
Which of the following data types cannot be used as a key in a dictionary?
x & y
If a={5,6,7,8}, which of the following statements is false?
Which of the following results in a SyntaxError?
What will be the value of the following Python expression?
bin(10-2)+bin(12^4)
Find the output of the following code:
def fun(x):
if x % 2 == 0:
return 1
else:
return
print(fun(5)+2)
Find the output of the following code:
a = 5
b = 5
c = a * b
name = "vk"
print(c)
print("I am %s. My score is %d" % (name, c))
What will be the output of the following Python code?
class fruits:
def __init__(self, price):
self.price = price
obj = fruits(50)
obj.quantity = 10
obj.bags = 2
print(obj.quantity + len(obj.__dict__))
def add(*args):
'''Function returns the addition
of all values'''
r = 0
for i in args:
r += i
return r
print (add.__doc__)
print (add(1, 2, 3))
print (add(1, 2, 3, 4, 5))