What is the output of the following code?
v = 2 * 4 ** 2
print(v)
What will be the output of the following Python function?
complex(1+2j)
What is the value of the following expression?
2+4.00, 2**4.0
Which of the following statements is optional in any Python program?
If a='cpp', b='buzz' then what is the output of:
c = a-b
print(c)
What is the output of the following Python code?
print('abcd'.translate({'a': '1', 'b': '2', 'c': '3', 'd': '4'}))
What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x:
x = x[1:]
print(i, end=" ")
What is the output of the given code?
tuple=('Abekus','learning')
tuple1=(1,2,3,4,6)
tuple2=(tuple1+tuple)
print(tuple2)
What will be the output of the following code?
def a(func):
def b():
print("**")
func()
print("##")
return b
@a
def sport():
sco = 10
print(sco * 10)
Can we create custom exception classes in Python?