Calculations with decimals

Asked by ithotline

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
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.