What will be the output of the following Python code snippet?
x = 'abcd' for i in range(len(x)): print(x) x = 'a'
a
abcd abcd abcd abcd
a a a a
none of the mentioned
1
8
True
False
What will be the output of the following Python code?
from math import powprint(math.pow(2,3))
Nothing is printed
Error, method pow doesn’t exist in math module
Error, the statement should be: print(pow(2,3))
colon
comma
semicolon
hyphen
6
9
11
i = 1while True: if i%2 == 0: break print(i) i += 2
1 2
1 2 3 4 5 6 …
1 3 5 7 9 11 … infinite time
20
20.0
28
28.0
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
What will be the value of the following Python expression?
print(4+2**5//10)
3
7
77
0
i = 0while i < 3: print(i) i += 1else: print(0)
0 1 2 3 0
0 1 2 0
0 1 2
What will be the output after the following statements?
a = 0b = 3while a + b < 8: a += 1 print(a, end='')
0 1 2 3 4
1 2 3 4 5
None of these
range(0,5)
range(1,5)
range(1,4)
range(0,4)
i = 2while True: if i%3 == 0: break print(i) i += 2
2 4 6 8 10 …
2 4
2 3
sqrt()
add()
rhombus()
home()
Error
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
print(float(4+int(2.39)%2))
5.0
5
4.0
4
What will be the output of the following Python expression?
print(4.00/(2.0+2.0))
1.0
1.00
id(x) == id(y)
len(x) == len(y)
x == y
all of these
int
bool
float
None
What will be the output of the following Python statement?
print(chr(ord('b')+1))
b
c
A
//
?
<
and
for
while
do while
None of the above
The truncated decimal part of a number
The rounded integer value of a number.
The truncated integer value of a number.
The floor (largest integer less than or equal to the number).
10
8.0
|
&
^
!
What will be the output of the following expression
x=14print(x>>2)
14
2
>=
<=
=
!=
What will be the value of X in the following Python expression?
x = 2+9*((3*12)-8)/10
30.0
30.8
28.4
27.2
What does the following code will print ?
x=5if x>3: print("Hello")
Hello
Hello Hello
nothing
Hello Hello Hello Hello Hello
ascii()
getAscii()
get_ascii()
ord()
for i in range(1,6): print(i, end='') if i == 3: break
1 2 3
1 2 3 4
asc()
asci()
What will be the output of following code
import mathprint(math.pi)
5.354562653589793
3.141592653589793
7.867564234556778
9.048495456553358
4.5
for i in range(0): print(i)
i = 1while False: if i%2 == 0: break print(i) i += 2
1 3 5 7 …
1 2 3 4 …
Nothing will be printed
or
equal
not
Both A and B
55
60
555
A*A=8
A*=8
A*8=A
A=*8
Type Casting
Data Transformation
Type modification
Variable Shifting
What is the output of the following ?
print(int())
Any Random Number
Yes
No
Can't say
x = 'abcd'for i in range(len(x)): i.upper()print (x)
a b c d
0 1 2 3