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 output of the following Python code?
t=32.00
[round((x-32)*5/9) for x in t]

What will be the output of the following Python code?
t=32.00
[round((x-32)*5/9) for x in t]
a) [0]
b) 0
c) [0.00]
d) error

Answer: d
Explanation: The value of t in the code shown above is equal to 32.00, which is a floating point value. ‘Float’ objects are not iterable. Hence the code results in an error.

Join The Discussion