True
False
Infinite
NULL
What will be the output of following code
import mathprint(math.pi)
5.354562653589793
3.141592653589793
7.867564234556778
9.048495456553358
What will be the output of the following Python code?
i = 1while True: if i%7 == 0: break print(i) i += 1
1 2 3 4 5 6
1 2 3 4 5 6 7
error
none of the mentioned
break
continue
pass
assert
6
18
10
None of these
id(x) == id(y)
len(x) == len(y)
x == y
all of these
a=b,b=a
a,b=b,a
a=b;b=a
a=b and b=a
x = 'abcd'for i in range(len(x)): print(i.upper())
a b c d
0 1 2 3
1 2 3 4
What will be the output of the following Python expression?
print(4.00/(2.0+2.0))
Error
1.0
1.00
1
What will the following code output?
a,b,c=3,5,6 b,c,a=a+1,b+2,c+3 print(a,” ”,b,” ”,c)
7 9 4
4 7 9
9 4 7
asc()
ord()
asci()
ascii()
//
?
<
and
for
While
do-while
Int
Float
int or float
27
9
3
What will be the output of the following python code?
from math import * floor(11.7)
12
11
11.0
none of these
What is the output?
x = 5print(bool(x))
5
unichr (x)
oct (x)
chr(x)
None of the these
x=0if x: print("True")else: print("False")
None
What will be the output of the following ?
import mathprint(math.fact(5))
120
25
1,2,3,4,5
while
do while
None of the above
for i in range(5): if i == 5: break else: print(i)else: print("Here")
0 1 2 3 4 Here
0 1 2 3 4 5 Here
0 1 2 3 4
1 2 3 4 5
go
over
;
x = "abcdef" i = "a" while i in x: print('i', end = " ")
no output
i i i i i i … infinite Time
a a a a a a …
a b c d e f
n=5 while n>0: n-=1 if n==2: continue print(n,end=' ')
5 4 3 1 0
4 3 1 0
4 3 2
a,b,c=3,5,6 b,c,a=a,b,c print(a,” ”,b,” ”,c)
3 5 6
6 3 5
5 6 3
6 5 3
a=b=c=1
a,b,c=1
a, b, c = 1, "python", 1.5
a=555 b=55 print( b in a)
55
TypeError
a=55 b=’55’ print( a is not b)
>=
<=
=
!=
Break stops the execution of entire program
Break halts the execution and forces the control out of the loop
Break forces the control out of the loop and starts the execution of next iteration
Break halts the execution of the loop for certain time frame
from math import*print(floor(3.7))
4
3.0
None of These
What will be the output of the following Python code snippet?
x = 'abcd' for i in range(len(x)): x = 'a' print(x)
a
abcd abcd abcd
a a a a
(1,3)
(2,5)
(2,1)
(4,8)
What will be the output after the following statements?
for i in range(1,6): print(i, end='') if i == 3: break
1 2
1 2 3
What will be the output of the following pseudocode, where ^ represent XOR operation ?
Integer a, b, cset b = 4, a = 3c =a ^ bPrint c
7
%
/
||
What will be the value of the following Python expression?
print(4+2**5//10)
77
0
a=5;b=7 b=a print(a,” ”,b)
5 7
7 5
5 5
7 7
range(0,3,1)
range(1,4,1)
range(1,3)
range(1,3,0)
[10, 8, 6]
[9, 7, 5]
[6, 8, 10]
[5, 7, 9]
+
-
*
( )
What will be the output of the following expression ?
x =4print(x<<2)
16
2
do..while
if..elif
4.0 + float(3)
5.3 + 6.3
5.0 + 3
3 + 7
[4,6]
[1, 2, 3, 4]
Error in Code
A*A=8
A*=8
A*8=A
A=*8
Entry Controlled Loop
Exit Controlled Loop
Both of the above