[Tutor] cs student needs help import math
Byron Ruffin
byron.ruffin at g.austincc.edu
Sun Sep 8 00:02:15 CEST 2013
I am writing a simple program based off an ipo chart that I did correctly.
I need to use ceil but I keep getting an error saying ceil is not defined.
I did import math, I think. I am using 3.2.3 and I imported this way...
>>> import math
>>> math.pi
3.141592653589793
>>> math.ceil(math.pi)
4
>>> math.floor(math.pi)
3
... but I get the error when using ceil...
pepsticks = ceil(peplength / StickLength)
Traceback (most recent call last):
File "<pyshell#19>", line 1, in <module>
pepsticks = ceil(peplength / StickLength)
NameError: name 'ceil' is not defined
Thanks for the help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130907/82e92343/attachment.html>
More information about the Tutor
mailing list