Question:

State True or False:

In Python, data type of 74 is same as the data type of 74.0.

Show Hint

A number written with a decimal point is a float, and one without it is an int. Compare the two types.
Updated On: Oct 20, 2026
Show Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Understand what the question asks:
Every value in Python has a data type. The question asks whether 74 and 74.0 have the same type.

Step 2: Find the type of 74:
74 has no decimal point. Python reads it as a whole number.
So its type is int.

Step 3: Find the type of 74.0:
74.0 has a decimal point. Python reads any number written with a decimal point as a floating point number.
So its type is float, even though the fractional part is zero.

Step 4: Check with the type() function:
print(type(74))
print(type(74.0))
print(type(74) == type(74.0))
Output:
<class 'int'>
<class 'float'>
False
The two classes are different, so the comparison gives False.

Final Answer:
The data types are int and float, so the statement is False.
Was this answer helpful?
0
0