What is the output of the following code?
print(True and False)
True
False
Error
None
0
infinite
5
ZeroDivisionError
or
equal
and
not
for
while
Both A and B
None of the above
What will the following code output?
a=5 a*=10 print(a)
10
50
k^1
k**1
k^ ^1
k^*1
Which among the following list of operators has the highest precedence?
+, -, **, %, /, <<, >>, |
<<
**
|
%
What will be the output of the following Python code?
from math import*print(floor(3.7))
3
4
3.0
None of These
>=
<=
=
!=
int
bool
float
What will be the output of the following ?
import mathprint(math.fact(5))
120
25
1,2,3,4,5
What does the following code print ?
if 2 + 5 == 8: print("TRUE")else: print("FALSE")print("TRUE")
TRUE
TRUE FALSE
TRUE TRUE
FALSE TRUE
What will be the output of following code
import mathprint(math.pi)
5.354562653589793
3.141592653589793
7.867564234556778
9.048495456553358
for i in range(int(2.0)): print(i)
0.0 1.0
0 1
error
none of the mentioned
7
8
6
count=0while count<3: print(count,end=" ") count+=1
0 1 2
1 2 3
0 1 2 3
55
60
555
asc()
ord()
asci()
ascii()
9
11
sqrt
rhombus
add
Sub
(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 4
1 2 3 4 5
What is the output of the following ?
print(int())
Any Random Number
1
What will be the output of the following Python code snippet?
x = 2for i in range(x): x += 1 print (x)
0 1 2 3 4 …
3 4
What does the following code will print ?
x=5if x>3: print("Hello")
Hello
Hello Hello
nothing
Hello Hello Hello Hello Hello
unichr (x)
oct (x)
chr(x)
None of the these
i = 2while True: if i%3 == 0: break print(i) i += 2
2 4 6 8 10 …
2 4
2 3
20.0
20
40.0
40
Type Casting
Data Transformation
Type modification
Variable Shifting
x = "abcdef"while i in x: print(i, end=" ")
a b c d e f
abcdef
i i i i i i …
find the output of following code:
import mathprint(math.fabs(-3.4))
-3.4
3.4
4.3
18
None of these
for i in range(3): print(i,end=" ")
What value does the following expression evaluate to ?
x = 5while x < 10: print(x, end='')
Closed loop
one time loop
Infinite loop
Evergreen loop
What will be the output of the following Python statement?
print(chr(ord('b')+1))
a
b
c
A
colon
comma
semicolon
hyphen
a=5;b=7 b=a print(a,” ”,b)
5 7
7 5
5 5
7 7
a=b,b=a
a,b=b,a
a=b;b=a
a=b and b=a
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
Arithmetic or Relational expression
Arithmetic or Logical expression
Relational or Logical expression
Arithmetic
Yes
No
if / else not used in python
None of the above.
A*A=8
A*=8
A*8=A
A=*8
What will be the output of the following python code?
from math import * floor(11.7)
12
11.0
none of these
x = 'abcd' for i in range(len(x)): print(x) x = 'a'
abcd abcd abcd abcd
a a a a
Identifier
Expression
Syntax
Task
27.2
29.0
14.9
12.3