D
D
DOK4ic2015-11-13 16:57:44
Python
DOK4ic, 2015-11-13 16:57:44

How to add signs to the fractional part?

Perhaps a stupid question, but you need to add fractional signs to the number, how to do this, I googled, but did not find it?
Example (from 1024 get 1024.000)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
GavriKos, 2015-11-13
@DOK4ic

i = float(1024).
Or do you need a formatted output?

K
Kir Marchenko, 2015-11-13
@kir64

print '%.3f' % 1024

A
Alexey, 2015-11-13
@RusTech

a = float(1024.123)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question