1.

Which of the following is incorrect?(a) float(‘inf’)(b) float(‘nan’)(c) float(’56’+’78’)(d) float(’12+34′)This question was addressed to me by my school teacher while I was bunking the class.My question is based upon Numeric Types topic in portion Variable Names, Operators, Data Types & Numeric Types of Python

Answer»

The CORRECT CHOICE is (d) float(’12+34′)

EASY EXPLANATION - ‘+’ cannot be converted to a float.



Discussion

No Comment Found

Related InterviewSolutions