What is the output of this expression, 3*1**3?
What is the result of the expression if x=15 and y=12:
x & y
What is the output of the following?
a = [0, 1, 2, 3]
for a[0] in a:
print(a[0])
Which of the following results in a SyntaxError ?
What is the output of the following code if the system date is 21st June, 2017 (Wednesday)?
[ ] or {}
{} or [ ]
What is the output of the following?
x = "abcdef"
i = "a"
while i in x:
x = x[:-1]
print(i, end = " ")
What is the output of the following?
x = 'abcd'
for i in range(len(x)):
x = 'a'
print(x)
Suppose s is “\t\tWorld\n”, what is s.strip() ?
What is the result of the expression shown below if x=56.236?
print("%.2f"%x)
The output of which of the codes shown below will be: “There are 4 blue birds.”?
What is the output of the following?
for i in 'abcd'[::-1]:
print (i)
What is the output of the following?
x = 'abcd'
for i in x:
print(i.upper())
Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.
What is the result of round(0.5) – round(-0.5)?
What is the output of the following code ?
>>>example="helloworld"
>>>example[::-1].startswith("d")
What is the output of the following?
for i in range(float('inf')):
print (i)
What is the value of the following expression:
8/4/2, 8/(4/2)
What is the output of the code shown below?
def f(x):
def f1(a, b):
print("hello")
if b==0:
print("NO")
return
return f(a, b)
return f1
@f
def f(a, b):
return a%b
f(4,0)
What is the output of the following?
x = "abcdef"
i = "i"
while i in x:
print(i, end=" ")
What is the output of the following?
x = 2
for i in range(x):
x += 1
print (x)
What is the output of the following?
i = 1
while False:
if i%2 == 0:
break
print(i)
i += 2
The format function, when applied on a string returns :
What is the output of the following?
x = 123
for i in x:
print(i)
What is the output of the following?
print("abc. DEF".capitalize())
What is the output of the code shown?
x=3.3456789
'%f | %e | %g' %(x, x, x)
Which of the following expressions involves coercion when evaluated in Python?
What is the output of the following?
string = "my name is x"
for i in ' '.join(string.split()):
print (i, end=", ")
It is not possible for the two’s complement value to be equal to the original value in any case. State whether this statement is true or false.
What is the output of the following code ?
>>>example = "snow world"
>>>print("%s" % example[4:7])
What is the output of the code shown below?
'%s' %((1.23,),)
What is the output of the code shown below?
not(3>4)
not(1&1)
The output of the line of code shown below is:
not(10<20) and not(10>30)
What dataype is the object below ?
L = [1, 23, ‘hello’, 1].
What is the output of the following?
print("abcdef".center())
Which of the following is incorrect?
What is the output of the code shown?
'{a}, {0}, {abc}'.format(10, a=2.5, abc=[1, 2])
What is the output of the following?
a = [0, 1, 2, 3]
for a[-1] in a:
print(a[-1])
What is the output of the following?
x = 'abcd'
for i in range(len(x)):
print(x)
x = 'a'
What is the output of the following?
for i in ''.join(reversed(list('abcd'))):
print (i)