Re: Python Math libraries - How to?

2008-05-09 Thread Gabriel Genellina
En Thu, 08 May 2008 13:17:51 -0300, delta2 [EMAIL PROTECTED] escribió: I am also using Zelle's book to teach myself programming and Python. I also had a problem with import math , but the alternative of from math import * is working for me. I don't know why one works and the other

Re: Python Math libraries - How to?

2008-05-08 Thread delta2
/listinfo/python-list -- View this message in context: http://www.nabble.com/Python-Math-libraries---How-to--tp16952032p17127534.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list

Python Math libraries - How to?

2008-04-28 Thread aguirre . adolfo
Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve problems using arithmetic, but when I try to upgrade the programs using math libraries nothing seems to work. I

Python Math libraries - How to?

2008-04-28 Thread aguirre . adolfo
Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve problems using arithmetic, but when I try to upgrade the programs using math libraries nothing seems to work. I

Re: Python Math libraries - How to?

2008-04-28 Thread Gary Herron
[EMAIL PROTECTED] wrote: Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve problems using arithmetic, but when I try to upgrade the programs using math

Re: Python Math libraries - How to?

2008-04-28 Thread John Henderson
[EMAIL PROTECTED] wrote: Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve problems using arithmetic, but when I try to upgrade the programs using math

Re: Python Math libraries - How to?

2008-04-28 Thread Benjamin Kaplan
On Mon, Apr 28, 2008 at 10:07 PM, [EMAIL PROTECTED] wrote: Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve problems using arithmetic, but when I try to

Re: Python Math libraries - How to?

2008-04-28 Thread aguirre . adolfo
Hi, thak you. I get the following: *** Error message * Traceback (most recent call last): File C:/Python25/z - MIS PROGRAMAS/volumen-b.py, line 20, in module main() File C:/Python25/z - MIS PROGRAMAS/volumen-b.py, line 13, in main volume = 4/3*pi*r3

Re: Python Math libraries - How to?

2008-04-28 Thread aguirre . adolfo
Thank you. I´ll try all methods to figure out the convenience of each Adolfo -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Math libraries - How to?

2008-04-28 Thread aguirre . adolfo
Thank you :-), I´ll do Adolfo pi is not a global name. When you do import math,you aren't adding everything to the name space, you are just telling python that you are going to be using that file. You then refer to it as math.*, such as math.pi, or math.pow(r,3). To use it the way you want

Re: Python Math libraries - How to?

2008-04-28 Thread Terry Reedy
Gary Herron [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: You have several ways to import a module, and your choice determines how you access things. Method 1: import math Then use: math.pi, math.sqrt, math.sin, math.cos, ... Method 2: from math import

Re: Python Math libraries - How to?

2008-04-28 Thread Cousin Stanley
Here is the arithmetic program I made that it worked before I added the import math line. #volumen.py # A program to compute the volume and surface area of a sphere import math NameError: global name 'pi' is not defined from math import * def surface( r ) : ...