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
int
bool
float
None
What is the output of the following ?
print(int())
Any Random Number
0
1
Error
a=5 a*=10 print(a)
5
10
50
20
20.0
28
28.0
No Operation
No Action
Null Statement
Placeholder
sqrt()
add()
rhombus()
home()
What will be the output of the following Python code?
for i in range(int(2.0)): print(i)
0.0 1.0
0 1
error
none of the mentioned
4
8
16
32
A*A=8
A*=8
A*8=A
A=*8
What will be the output of the following Python expression?
print(4.00/(2.0+2.0))
1.0
1.00
go
pass
over
;
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
x = "abcdef"i = "a"while i in x: print(i, end = " ")
no output
i i i i i i …
a a a a a a …
a b c d e f
k^1
k**1
k^ ^1
k^*1
7
3
i = 1while False: if i%2 == 0: break print(i) i += 2
1 3 5 7 …
1 2 3 4 …
Nothing will be printed
True
false
ValueError occurs
TypeError occurs
x = "abcdef"i = "i"while i in x: print(i, end=" ")
abcdef
What is the output of following Python code?
>>print(5*(2//3))
3.3
range(0,5)
range(1,5)
range(1,4)
range(0,4)
|
&
^
!
x = "abcdef"while i in x: print(i, end=" ")
x = "abcdef" i = "a" while i in x: print('i', end = " ")
i i i i i i … infinite Time
a=555 b=55 print( b in a)
False
55
TypeError
+
-
*
( )
find the output of following code:
import mathprint(math.fabs(-3.4))
-3.4
3.4
4.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
for i in range(2.0): print(i)
//
?
<
and
Arithmetic or Relational expression
Arithmetic or Logical expression
Relational or Logical expression
Arithmetic
Type Casting
Data Transformation
Type modification
Variable Shifting
6
9
11
40.0
40
for
while
Both A and B
None of the above
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
1 2 3 4
12.5
9.8
[10, 8, 6]
[9, 7, 5]
[6, 8, 10]
[5, 7, 9]
27.2
29.0
14.9
12.3
; (semicolon)
,(Comma)
: (colan)
None of these
sqrt
rhombus
add
Sub
4.5
4.0
What will be the output of the following expression
x=14print(x>>2)
14
2
ascii()
getAscii()
get_ascii()
ord()
Selection
Sequential
Simple
Loop
65536
33
169
What does the following code print ?
if 2 + 5 == 8: print("TRUE")else: print("FALSE")print("TRUE")
TRUE
TRUE FALSE
TRUE TRUE
FALSE TRUE
x = 'abcd'for i in range(len(x)): print(i)
a b c d
0 1 2 3