Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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

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

Answer: 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.

Join The Discussion