9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855 SEARCHING FOR ACADEMIC PROJECT?
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855    ### PYTHON QUESTIONS : PART 4

Which is the correct operator for power(x^y)?

X'y

X**y

x^^y

None of the mentioned

The output of the expression is:

bin(29)

'Ob10111'

'Ob11101'

'Ob11111'

'Ob11011'

Which of the following represents the bitwise XOR operator?

&

^

|

!

What is the order of precedence in python?

i)Parentheses

ii) Exponential

iii) Division

iv) Multiplication

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

Operators with the same precedence are evaluated in which manner?

Left to Right

Right to Left

Cant say

None of the mentioned

Consider the expression given below. The value of X is:

X=2 +9*((3*12) - 8)/10

30.0

30.8

28.4

27.2

What is the value of the expression

Boat(4+int(2.39)%2)

5.0

5

4.0

4

What is the output of the following code?

if None

print("Hello")

False

Hello

Nothing will be printed

Syntax error

The 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

What is the output of the code shown below?

if (9<0) and (0<-9):

print("hello")

elif (9 > 0) or False:

print("good")

else:

error

hello

good

What 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

In 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

What 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