True
False
1
Error
What will be the output of the following Python code?
x = 'abcd'for i in range(x): print(i)
a b c d
0 1 2 3
error
none of the mentioned
What will the following code output?
a=555 b=55 print( b in a)
55
TypeError
4
4.0
8
8.0
What will be the output of the following pseudocode, where ^ represent XOR operation ?
Integer a, b, cset b = 4, a = 3c =a ^ bPrint c
3
5
7
go
pass
over
;
-9
9
6
-6
10
0
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.0
20
40.0
40
What will be the output of the following Python statement?
print(chr(ord('b')+1))
a
b
c
A
not
or
and
xor
What will be the value of the following Python expression?
print(4+2**5//10)
77
+
*
**
//
continue
check
range
break
12.5
9.8
Infinite Loop
conditional loop
unlimited loop
None of these
[4,6]
[1, 2, 3, 4]
Error in Code
%
/
id(x) == id(y)
len(x) == len(y)
x == y
all of these
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
assert
What is the output of the following?
m=0while m<5: m+=1 if m==3: break else: print(0)
0 1 2 0
0 1 2
0 0 1 0 2
a=55 b=’55’ print( a is not b)
What is the output of following code
print( 5 in 515)
ValueError
0.0
1.0
a=b=c=1
a,b,c=1
a, b, c = 1, "python", 1.5
None of the above
What will be the output of the following Python code snippet?
x = 'abcd'for i in range(len(x)): i.upper()print (x)
[10, 8, 6]
[9, 7, 5]
[6, 8, 10]
[5, 7, 9]
~
|
&
^
What will be the output of following code
import mathprint(math.pi)
5.354562653589793
3.141592653589793
7.867564234556778
9.048495456553358
range(0,5)
range(1,5)
range(1,4)
range(0,4)
None of These
for
while
do while
find the output of following code:
import mathprint(math.fabs(-3.4))
-3.4
3.4
4.3
12.6
'12.6'
12
Syntax Error
print(chr(ord('A')+32))
B
What will be the output after the following statements?
for i in range(1,6): print(i, end='') if i == 3: break
1 2 3
1 2 3 4
1 2 3 4 5
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).
[0, 2, 4]
[1, 3, 5]
[0, 1, 2, 5]
[0, 5, 2]
What is the output of following Python code?
>>print(5*(2//3))
3.3
What is the output?
x = 5print(bool(x))
What is the output of the following code?
for i in range(3): print(i,end=" ")
What will be the output of the following Python expression?
print(4.00/(2.0+2.0))
1.00
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
16
32
Which among the following list of operators has the highest precedence?
+, -, **, %, /, <<, >>, |
<<
x = 'abcd'for i in range(len(x)): print(i)
What does the following code will print ?
x=5if x>3: print("Hello")
Hello
Hello Hello
nothing
Hello Hello Hello Hello Hello