27
9
3
1
dlroWolleH
Hello Worl
d
Error
int
bool
void
None
True
False
Machine dependent
print s[0]
print s.lower()
s[1]='r'
print s.strip()
a_=3
_a=3
a?=3
All of These
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)
2
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)
7
8
6
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))
The number are equal
None of These
infile.read(2)
infile.read()
infile.readlines()
infile.readline()
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
5
Rectangle
Parallelogram
Circle
Diamond
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)
4 is maximum
None of these
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))
dump()
load()
Both A and B
None of the above
/ /
>
and
?
20
20.0
28
28.0
Int
Float
int or float
%
/
//
||
*
**
<
==