Deutsch   English   Français   Italiano  
<62681374$0$18734$426a74cc@news.free.fr>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp1-2.free.fr!not-for-mail
From: yves <yves@free.invalid>
Subject: Re: arrondir une =?iso-8859-1?Q?r=E9ponse?=
Newsgroups: fr.comp.lang.python
References: <5rudnb0rPIS2Yvr_nZ2dnUU7_83NnZ2d@giganews.com>
User-Agent: Pan/0.144 (Time is the enemy; 28ab3ba git.gnome.org/pan2)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Date: 26 Apr 2022 15:44:52 GMT
Lines: 31
Message-ID: <62681374$0$18734$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 26 Apr 2022 17:44:52 CEST
NNTP-Posting-Host: 89.226.117.233
X-Trace: 1650987892 news-2.free.fr 18734 89.226.117.233:51154
X-Complaints-To: abuse@proxad.net
Bytes: 1760

Le Tue, 26 Apr 2022 09:18:19 -0500, Cyrnea a écrit:

Bonjour,

> Comment arrondir une réponse arrondie ( au choix ) lorsqu'on a une
> réponse obtenue à l'aide d'une fonction ?
> ex: écart-type obtenu = 0,9654485745112...
> J'obtiens pour erreur " fonction :  2 arguments seulement ".

Ta question est un peu sibylline.

Quelle est cette fonction dont tu parles ? 
Qui l'a codée ? toi-même ?

Sinon, pour arrondir, la fonction dans python s'appelle "round".

>>> help(round)

Help on built-in function round in module builtins:

round(...)
    round(number[, ndigits]) -> number
    
    Round a number to a given precision in decimal digits (default 0 
digits).
    This returns an int when called with one argument, otherwise the
    same type as the number. ndigits may be negative.

@+
-- 
Yves