Robotics & Artificial Intelligence
Predict the data type of the given Python statement:
n=0.0025
print(type(n))
Python Functions
2 Likes
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
1 Like
Related Questions
Predict the data type of the given Python statement:
m=12E4 print(type(m))Predict the data type of the given Python statement:
p='10' print(type(int(p)))Predict the output of the following code:
def Add(num1, num2): sum = num1 + num2 sum = Add(20, 30) print(sum)Predict the output of the following code:
def Sum(a, b): return a+5, b*5 # main program result = Sum(4, 5) print(result)