Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 40)
40.
How can you format a floating-point number with a specific number of decimal places?
format_float(number, 2)
round(number, 2)
format(number, ".2f")
decimal_format(number, 2)
Answer: Option
Explanation:
To format a floating-point number with a specific number of decimal places, use format(number, ".2f").
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.