Which is the correct operator for power(x^y)?
X'y
X**y
x^^y
None of the mentioned
SHOW ANSWERThe output of the expression is:
bin(29)
'Ob10111'
'Ob11101'
'Ob11111'
'Ob11011'
SHOW ANSWERWhich of the following represents the bitwise XOR operator?
&
^
|
!
SHOW ANSWERWhat is the order of precedence in python?
i)Parentheses
ii) Exponential
iii) Division
iv) Multiplication
v) Addition
vi) Subtraction
i,ii,iii,iv,v,vi
ii,i,iii,iv,v,vi
ii,i,iv,iii,v,vi
i,ii,iii,iv,vi,v
SHOW ANSWEROperators with the same precedence are evaluated in which manner?
Left to Right
Right to Left
Cant say
None of the mentioned
SHOW ANSWERConsider the expression given below. The value of X is:
X=2 +9*((3*12) - 8)/10
30.0
30.8
28.4
27.2
SHOW ANSWERWhat is the value of the expression
Boat(4+int(2.39)%2)
5.0
5
4.0
4
SHOW ANSWERWhat is the output of the following code?
if None
print("Hello")
False
Hello
Nothing will be printed
Syntax error
SHOW ANSWERThe if...elif-else executes only one block of code among several blocks
True
False
It depends on expression used
There is no elif statement in Python
SHOW ANSWERWhat is the output of the code shown below?
if (9<0) and (0<-9):
print("hello")
elif (9 > 0) or False:
print("good")
else:
print(bad)
error
hello
good
bad
SHOW ANSWERWhat is the output of the following?
for in range(10):
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
SHOW ANSWERIn Python, for and while loop can have optional else statement?
Only for loop can have optional else statement
Only while loop can have optional else statement
Both loops can have optional else statement
Loops cannot have else statement in Python
SHOW ANSWERWhat is the output of the following code?
i= sum= 0
while i<=4:
sum +=i
i=i+1
print(sum)
0
10
4
None of the above
SHOW ANSWER