> Dennis Lee Bieber <[EMAIL PROTECTED]> (DLB) wrote:
>DLB> On Fri, 07 Mar 2008 23:12:27 +0100, Piet van Oostrum <[EMAIL PROTECTED]>
>DLB> declaimed the following in comp.lang.python:
>>> Sorry to come in so late in this discussion. Although it is correct to say
>>> that many real numbers tha
Mark Dickinson schreef:
> On Mar 7, 11:23 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Fri, 07 Mar 2008 23:12:27 +0100, Piet van Oostrum wrote:
>>> Sorry to come in so late in this discussion. Although it is correct to
>>> say that many real numbers that have an exact d
On Mar 8, 11:34 am, Mark Dickinson <[EMAIL PROTECTED]> wrote:
> following, which arises from Python arbitrarily stripping trailing
> zeros from the result returned by the C library functions:
Correction: on closer examination it's not Python doing the
stripping of trailing zeros; it's the C librar
On Mar 7, 11:23 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Fri, 07 Mar 2008 23:12:27 +0100, Piet van Oostrum wrote:
> > Sorry to come in so late in this discussion. Although it is correct to
> > say that many real numbers that have an exact decimal representation
> > can
On Fri, 07 Mar 2008 23:12:27 +0100, Piet van Oostrum wrote:
> Sorry to come in so late in this discussion. Although it is correct to
> say that many real numbers that have an exact decimal representation
> cannot be exactly represented in binary, that is no excuse to print 53.6
> as 53.600
On Mar 7, 5:12 pm, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
> Python just uses the C library for printing, I presume, and the conversion
> routines in the C library are rather simplistic. It is, however, possible
> to do better, so that 53.6 -- although internally represented as something
> that
> casevh <[EMAIL PROTECTED]> (C) wrote:
>C> On Feb 25, 2:44 am, [EMAIL PROTECTED] wrote:
>>> Hi I'm very much a beginner with Python.
>>> I want to write a function to convert celcius to fahrenheit like this
>>> one:
>>>
>>> def celciusToFahrenheit(tc):
>>> tf = (9/5)*tc+32
>>> return tf
>>>
On Feb 26, 7:14 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | Hi I'm very much a beginner with Python.
> | I want to write a function to convert celcius to fahrenheit like this
> | one:
> |
> | def celciusToFahrenheit(tc):
> |
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi I'm very much a beginner with Python.
| I want to write a function to convert celcius to fahrenheit like this
| one:
|
| def celciusToFahrenheit(tc):
|tf = (9/5)*tc+32
|return tf
Unless you are importing 'integer division'
[EMAIL PROTECTED] wrote:
> Hi I'm very much a beginner with Python.
> I want to write a function to convert celcius to fahrenheit like this
> one:
>
> def celciusToFahrenheit(tc):
> tf = (9/5)*tc+32
> return tf
>
> I want the answer correct to one decimal place, so
> celciusToFahrenheit(1
Necmettin Begiter <[EMAIL PROTECTED]> wrote:
>25 February 2008 Monday 12:44:46 tarihinde [EMAIL PROTECTED] =C5=9Fun=
>lar=C4=B1 yazm=C4=B1=C5=9Ft=C4=B1:
>> Of course the function above returns 53.601.
>>=20
>> How do I format it correctly?
>
>Use the round(number,digits) function:
>
>t
On Feb 25, 2:44 am, [EMAIL PROTECTED] wrote:
> Hi I'm very much a beginner with Python.
> I want to write a function to convert celcius to fahrenheit like this
> one:
>
> def celciusToFahrenheit(tc):
> tf = (9/5)*tc+32
> return tf
>
> I want the answer correct to one decimal place, so
> cel
25 February 2008 Monday 12:44:46 tarihinde [EMAIL PROTECTED] şunları yazmıştı:
> Hi I'm very much a beginner with Python.
> I want to write a function to convert celcius to fahrenheit like this
> one:
>
> def celciusToFahrenheit(tc):
> tf = (9/5)*tc+32
> return tf
>
> I want the answer co
sabatier wrote:
> On Feb 25, 10:44 am, [EMAIL PROTECTED] wrote:
>> Hi I'm very much a beginner with Python.
>> I want to write a function to convert celcius to fahrenheit like this
>> one:
>>
>> def celciusToFahrenheit(tc):
>> tf = (9/5)*tc+32
>> return tf
>>
>> I want the answer correct t
On Feb 25, 10:44 am, [EMAIL PROTECTED] wrote:
> Hi I'm very much a beginner with Python.
> I want to write a function to convert celcius to fahrenheit like this
> one:
>
> def celciusToFahrenheit(tc):
> tf = (9/5)*tc+32
> return tf
>
> I want the answer correct to one decimal place, so
> ce
15 matches
Mail list logo