The following symbol represent
What will following code segment print?
a=True b=False c=False if not a or b: print(1) elif not a or not b and c: print(2) elif not a or b or not b and a: print(3) else: print(4)
How many numbers will be printed by the following code?
def fun(a,b): for x in range(a,b+1): if x%3==0: print(x,end=" ") fun(100,120)
What is the output of below program ?
def maximum(x,y): if x>y: return x elif x==y: return "The number are equal" else: return y print(maximum(2,3))
What will be the output of the following pseudo code?
integer a,b set a=9,b=5 a=a mod(a-3) b=b mod(b-3) print a+b
What will be the output of the following python code?
def printMax(a,b): if a>b: print(a, "is maximum") elif a==b: print(a, "is equal to ",b) else: print(b, "is maximum") printMax(3,4)
What will be the output of the following python program?
def addItem(listParam): listParam+=[1] mylist=[1,2,3,4] addItem(mylist) print(len(mylist))
def say(message, times =1): print(message * times) say("Hello") say("Word",5)
What is the output of the following code ?
import numpy as np y = np.array([[11, 12, 13, 14], [32, 33, 34, 35]]) print(y.ndim)
What is the output of the following code?
dict={"Joey":1, "Rachel":2} dict.update({"Phoebe":2}) print(dict)
What will be the output after the following statements?
for i in range(1,6): print(i, end='') if i == 3: break
a = set('dcma') b = set('mlpc') print(a^b)
What will be the output of the following ?
print((range(4)))
What is the output of this code?
def calc(x): r=2*x**2 return r print(calc(5))
def add(a, b): return a+5, b+5 result = add(3,2) print(result)
What will be the output of the following pseudocode, where ^ represent XOR operation ?
Integer a, b, c set b = 4, a = 3 c =a ^ b Print c
What is the return type of following function ?
def func1(): return 'mnp',22 print(type(func1()))
What will be the output of the following Python code?
from math import pow print(math.pow(2,3))
a = 0 b = 3 while a + b < 8: a += 1 print(a, end='')
What will be the output of the following expression ?
x =4 print(x<<2)
What will be the output of the following?
def iq(a,b): if(a==0): return b else: return iq(a-1,a+b) print(iq(3,6))
What does the following code print ?
x = 'mohan' for i in range (len(x)): x[i].upper() print (x)
What will be the output after following statements?
x = 2 if x < 5: print(x) else: pass
What will be the output of the following code?
f=open("demo.txt","r") print(f.tell())
import numpy as np a = np.array([[1,2,3]]) print(a.shape)
def fun(a, b=6): a=a+b print(a) fun(5, 4)