Python Programming - Data Types - Discussion

Discussion Forum : Data Types - General Questions (Q.No. 34)
34.
How do you convert a floating-point number to an integer?
int(x)
convert(x, int)
x.integer()
round(x)
Answer: Option
Explanation:
The int() function can be used to convert a floating-point number to an integer by truncating the decimal part.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.