You can use string formatting here:
Je Body Mass Index is %.1f%gewicht/lengte**2
Actually, I'm not sure this word work correctly. Better:
Je Body Mass Index is %.1f%(gewicht/lengte**2)
that should definitely owrk
--
Andre Engels, [EMAIL PROTECTED]
ICQ: 6260644 -- Skype: a_engels
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
michel maho wrote, On 05/02/2006 07:33 AM:
To all
I have the following calculation:
Je Body Mass Index is,gewicht/lengte**2
The result is a (digital?)floating point figure with with 10 decimal
numbers. For =
example
I have been using python for sometime...and occasionally I noticed
significant delay before the code would run but unitl now I have been able
to write it off to other things. Now I have a short script that I wrote to
check some files and print out a few lines.
I have noticed that usually the
Ertl, John wrote:
I have been using python for sometime...and occasionally I noticed
significant delay before the code would run but unitl now I have been able
to write it off to other things. Now I have a short script that I wrote to
check some files and print out a few lines.
I have
Kent,
The files are very small (a few hundred lines). Maybe it is a network
issue? But then why is it always slow the first time in the morning? I
don't know network stuff but that seams a bit strange.
Thanks,
John Ertl
-Original Message-
From: Kent Johnson [mailto:[EMAIL
Ertl, John wrote:
Kent,
The files are very small (a few hundred lines). Maybe it is a network
issue? But then why is it always slow the first time in the morning? I
don't know network stuff but that seams a bit strange.
Maybe the network access is slow and the files are cached locally
Kent,
I will check with the systems guys...and the Perl guys down the hall to see
if they have the same problem.
Thanks for the help.
John Ertl
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kent Johnson
Sent: Tuesday, May 02, 2006 12:27 PM
I have been using python for sometime...and occasionally I noticed
significant delay before the code would run but unitl now I have been
able to write it off to other things. Now I have a short script that I
wrote to check some files and print out a few lines.
I have noticed that
Danny,
What is the best way to track the time uses in I/O and CPU. Here is the
code. It checks some text files for a user name and collects memory and
inode usage then adds them together and checks against a set limit...if the
limit is reached it calls a mail script to send an email warning.
Hi John,
You can try something like the profiler, which will say where most of the
program's time is being spent. We can find documentation on the Python
profiler here:
http://www.python.org/doc/lib/profile.html
From a rough, low-level standpoint, there are tools like 'top' on Linux
Hi!
Is there a simpler/fster way to check if a value
has int or float type (i.e. is a real number) than:
v=some numeric value
if isinstance(v, int) or isinstance(v, float):
block
(v must not be complex)
Regards,
Gregor
--
Gregor Lingl
Reisnerstrasse 3/19
A-1030 Wien
Telefon: +43 1
On 03/05/06, Gregor Lingl [EMAIL PROTECTED] wrote:
Hi!
Is there a simpler/fster way to check if a value
has int or float type (i.e. is a real number) than:
v=some numeric value
if isinstance(v, int) or isinstance(v, float):
block
(v must not be complex)
Well, for one, you can
I am trying to count the number of times a positive
number is entered from the user. But, the program must stop after 5 user
inputs or a negative number.
Can anyone help.
Rick
___
Tutor maillist - Tutor@python.org
On Tue, 2006-05-02 at 19:25 -0400, MICHELLE EVANS wrote:
I am trying to count the number of times a positive number is entered
from the user. But, the program must stop after 5 user inputs or a
negative number.
Can anyone help.
Yes, but you need to help yourself also.
Do you know how to
On Tue, 2 May 2006, MICHELLE EVANS wrote:
I am trying to count the number of times a positive number is entered
from the user. But, the program must stop after 5 user inputs or a
negative number.
That seems like a really arbitrary and silly thing to do, but ok.
So... what question do
15 matches
Mail list logo