KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Predict the data type of the given Python statement:

m=12E4
print(type(m))

Python Functions

1 Like

Answer

Output
<class 'float'>
Explanation

The value 12E4 represents 12 × 10⁴ = 120000 in scientific (exponential) notation. Numbers written in exponential notation are always treated as floating-point numbers in Python. Hence, the data type of m is float.

Answered By

1 Like


Related Questions