Robotics & Artificial Intelligence

Predict the data type of the given Python statement:

n=0.0025
print(type(n))

Python Functions

1 Like

Answer

Output
<class 'float'>
Explanation

The value 0.0025 is a number with a decimal point, which is treated as a floating-point number in Python. Hence, the data type of n is float.

Answered By

3 Likes


Related Questions