Calculations with decimals

Asked by ithotline on 2019-12-31

When executing this:

test = 11/4
print(str(format(test, '.5f')))

i get:
2.00000

How do i get the true value of:

2.75000

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-12-31
Last reply:
2020-01-01
masuo (masuo-ohara) said : #1

aa = 11.0/4.0
print str(format(aa, '.5f'))

Can you help with this problem?

Provide an answer of your own, or ask ithotline for more information if necessary.

To post a message you must log in.