M

Mr. Dubey • 52.30K Points
Coach

Q. What will be the value of the following
Python expression?
float(4+int(2.39)%2)

(A) 5.0
(B) 5
(C) 4.0
(D) 4
Correct : Option (C)

Explanation:
 the above expression is an example of explicit conversion. it is evaluated as: float(4+int(2.39)%2) = float(4+2%2) = float(4+0) = 4.0. hence the result of this expression is 4.0.

Share

Discusssion

Login to discuss.

Be the first to start discuss.