Re: Beginner question: Logs?

2005-06-03 Thread Peter Hansen
Robert Kern wrote: > Greg Ewing wrote: [about the "from xxx import *" syntax] >> Better still, don't even *mention* it to a beginner. >> They don't need to know about it. At all. Really. > > Well, the OP's use is precisely why "from xxx import *" exists: the > interactive prompt. In that case (a

Re: Beginner question: Logs?

2005-06-02 Thread Robert Kern
Greg Ewing wrote: > Peter Hansen wrote: > >>It's always a good idea, especially when answering a beginner's >>question, to add the caution that this form ("from xxx import *") has >>certain dangers** associated with it, and is widely considered poor >>style, and should really only rarely be use

Re: Beginner question: Logs?

2005-06-02 Thread Greg Ewing
Peter Hansen wrote: > It's always a good idea, especially when answering a beginner's > question, to add the caution that this form ("from xxx import *") has > certain dangers** associated with it, and is widely considered poor > style, and should really only rarely be used. Better still, don'

Re: Beginner question: Logs?

2005-06-02 Thread Terry Reedy
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Elliot Temple wrote: >> from math import * >> log10(15625) > > It's always a good idea, especially when answering a beginner's > question, to add the caution that this form ("from xxx import *") has > certain dangers** a

Re: Beginner question: Logs?

2005-06-02 Thread Terry Reedy
> import math > math.log10(15625) To find out the names of function in the math module without checking the docs, do >>> dir(math) #same for any other module To get more info, do >>> help(math) # same for any other module with a doc string Terry J. Reedy -- http://mail.python.org/mailman

Re: Beginner question: Logs?

2005-06-02 Thread Peter Hansen
Elliot Temple wrote: > from math import * > log10(15625) It's always a good idea, especially when answering a beginner's question, to add the caution that this form ("from xxx import *") has certain dangers** associated with it, and is widely considered poor style, and should really only rarely

Re: Beginner question: Logs?

2005-06-01 Thread Elliot Temple
On Jun 1, 2005, at 9:04 PM, Svens wrote: > Hey thanks... > > Still getting an error message though. Here's what i'm doing: > -- > import math > log10(15625) > -- > -It says that log10 is not defined, but it is since the module is > imported, right? do either import math math.log10(1562

Re: Beginner question: Logs?

2005-06-01 Thread Stephen Prinster
Svens wrote: > Hey thanks... > > Still getting an error message though. Here's what i'm doing: > -- > import math > log10(15625) > -- > -It says that log10 is not defined, but it is since the module is > imported, right? > try this: import math math.log10(15625) -- http://mail.python.

Re: Beginner question: Logs?

2005-06-01 Thread Robert Kern
Svens wrote: > Hey thanks... > > Still getting an error message though. Here's what i'm doing: > -- > import math > log10(15625) > -- > -It says that log10 is not defined, but it is since the module is > imported, right? No, read the tutorial. import math math.log10(15625) -- Robert K

Re: Beginner question: Logs?

2005-06-01 Thread Svens
Hey thanks... Still getting an error message though. Here's what i'm doing: -- import math log10(15625) -- -It says that log10 is not defined, but it is since the module is imported, right? -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question: Logs?

2005-06-01 Thread Robert Kern
Svens wrote: > Hey everyone! I'm a math student working on a short script involving > logs. I have a function on my scientific calculator, and was wondering > if there was a similar funtion in python. > > For example: > > (log65536)/(log4)= 8 > > I've searched around a bit and haven't been able

Beginner question: Logs?

2005-06-01 Thread Svens
Hey everyone! I'm a math student working on a short script involving logs. I have a function on my scientific calculator, and was wondering if there was a similar funtion in python. For example: (log65536)/(log4)= 8 I've searched around a bit and haven't been able to find anything. Thanks! -Ch