I have problem in generating or getting decimal value in python.
for now, I am using float(), but it returns .0 not .00 …
>>> d = 10
>>> float(d)
10.0
>>>
how can I set a decimal value that returns with .00?
>>10.00
thanks in advance …
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Python only displays what’s needed, so it displated
10.0If it’s the matter of printing it as 10.00.
To do that.