1.

What is the type of inf?(a) Boolean(b) Integer(c) Float(d) ComplexThe question was posed to me during an interview for a job.This interesting question is from Numeric Types topic in section Variable Names, Operators, Data Types & Numeric Types of Python

Answer»

The CORRECT choice is (c) Float

Best explanation: Infinity is a special case of floating POINT NUMBERS. It can be obtained by float(‘INF’).



Discussion

No Comment Found

Related InterviewSolutions