floor() function definition
Grant Edwards
grante at visi.com
Tue May 15 21:50:49 EDT 2001
On Tue, 15 May 2001 23:36:04 GMT, Dev_NuLL <dev_null at email.com> wrote:
>What does floor() do?
Try it and see!
>>> from math import floor
>>> floor(1.2)
1.0
>>> floor(2.9)
2.0
>>> floor(3.98)
3.0
>>> floor(2.0)
2.0
>>> floor(-3.34)
-4.0
>>> floor (0)
0.0
>>> floor(-2.1)
-3.0
Now you get three guesses as to the definition of floor().
--
Grant Edwards grante Yow! I feel better about
at world problems now!
visi.com
More information about the Python-list
mailing list