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


Groups > comp.lang.python > #42330

Re: round off to two decimal & return float

Path csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <amachu@amachu.me>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.182
X-Spam-Level *
X-Spam-Evidence '*H*': 0.67; '*S*': 0.04; 'float': 0.07; 'subject:two': 0.07; 'assume': 0.14; 'wrote:': 0.18; 'header:User- Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'received:208.97': 0.31; 'received:208.97.132': 0.31; 'received:66.33': 0.31; 'received:66.33.216': 0.31; 'received:66.33.216.122': 0.31; 'received:dreamhost.com': 0.31; 'received:g.dreamhost.com': 0.31; 'received:hapkido.dreamhost.com': 0.31; 'received:66': 0.35; 'but': 0.35; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'march': 0.61; 'received:208': 0.61; 'from:charset:utf-8': 0.61; 'saturday': 0.68; 'subject: & ': 0.68; 'received:208.97.132.66': 0.84; 'subject:round': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha1; c=relaxed; d=amachu.me; h=message-id :date:from:mime-version:to:subject:references:in-reply-to: content-type; s=amachu.me; bh=MapVarbWj1yksQzDNpi2FezPDpA=; b=Ks WCOVEQ5zgNY89Lusl0bGaZ4swyVTaCXPmznVbhKa2Gl73WYm8nMtM9Xo/q8v8VuU bUUL7u92Sx5eEdOTNN6dmyxdGNSwfxFV3h8xgdYpuevVz7pAnRlMayRPMOo2vXA1 BCrXB84g4y4ANPoRLpZdDw14HMNWXIeh6eOJ1e9Fw=
Date Sat, 30 Mar 2013 15:02:34 +0530
From ஆமாச்சு <amachu@amachu.me>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4
MIME-Version 1.0
To python-list@python.org
Subject Re: round off to two decimal & return float
References <515699DB.8060104@amachu.me> <CALk2KRU37Ri-EfwGKZK3MR-MHBoCuvx1u6DDj7BqBcav+9OqCA@mail.gmail.com>
In-Reply-To <CALk2KRU37Ri-EfwGKZK3MR-MHBoCuvx1u6DDj7BqBcav+9OqCA@mail.gmail.com>
Content-Type multipart/alternative; boundary="------------090807020002030006030104"
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3992.1364636123.2939.python-list@python.org> (permalink)
Lines 45
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1364636123 news.xs4all.nl 6990 [2001:888:2000:d::a6]:50032
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:42330

Show key headers only | View raw


[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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

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

csiph-web