Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42330 > unrolled thread

Re: round off to two decimal & return float

Started byஆமாச்சு <amachu@amachu.me>
First post2013-03-30 15:02 +0530
Last post2013-03-30 13:36 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: round off to two decimal & return float ஆமாச்சு <amachu@amachu.me> - 2013-03-30 15:02 +0530
    Re: round off to two decimal & return float Grant Edwards <invalid@invalid.invalid> - 2013-03-30 13:36 +0000

#42330 — Re: round off to two decimal & return float

Fromஆமாச்சு <amachu@amachu.me>
Date2013-03-30 15:02 +0530
SubjectRe: round off to two decimal & return float
Message-ID<mailman.3992.1364636123.2939.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

On Saturday 30 March 2013 02:58 PM, Roland Mueller wrote:
>
>
>
> I assume you have a numeric value a and want to have a float with 2
> decimals. This can be achieved with the function round(): 

But I need 10.00 and not 10.0

[toc] | [next] | [standalone]


#42335

FromGrant Edwards <invalid@invalid.invalid>
Date2013-03-30 13:36 +0000
Message-ID<kj6ppl$kiq$1@reader1.panix.com>
In reply to#42330
On 2013-03-30, ????????????????????? <amachu@amachu.me> wrote:
> On Saturday 30 March 2013 02:58 PM, Roland Mueller wrote:
>>
>>
>>
>> I assume you have a numeric value a and want to have a float with 2
>> decimals. This can be achieved with the function round(): 
>
> But I need 10.00 and not 10.0

They're the same number.

Are you asking how to format floating point numbers when they're
displayed?

-- 
Grant

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web