What will be the value of the following Python expression?
4 + 3 % 5
What is the output of the given code?
a=3.5
a='Abekus'
print(a)
To remove string “hello” from list1, we use which command?
To add a new element to a list we use which command?
What will be the output of the following Python code snippet?
d = {"john":40, "peter":45}
d["john"]
a = [-1, 1, 66.25, 333, 333, 1234.5]
>>> del a[0]
print(a)
What is the output of the given code?
print("Abekus",end="@")
print("Continue")
What is the output of the given code?
n=23
if n>40:
print("I am larger")
elif n<20:
print("I am smaller")
else:
print("I am here")
What will be the output of the following Python code?
for i in range(5):
if i == 5:
break
else:
print(i)
else:
print("Here")
Is the following Python code valid?
class B(object):
def first(self):
print("First method called")
def second(self):
print("Second method called")
ob = B()
B.first(ob)