ENC: math module

Jeffrey Drake jpt.d at rogers.com
Thu Jan 10 06:36:38 EST 2002


Please post in text only (plain text). HTML just messages many
newsreaders up. Especially some of the linux ones.

On Thu, 10 Jan 2002 08:42:50 -0300, "Alves, Carlos Alberto - Coelce"
<calves at coelce.com.br> wrote:

>This message is in MIME format. Since your mail reader does not understand
>this format, some or all of this message may not be legible.
>
>------_=_NextPart_001_01C199CB.EEA8B850
>Content-Type: text/plain;
>	charset="ISO-8859-1"
>
>Yes, You must use the complete reference to the object <modulename.object>
>just like this:
>
>import math
>math.exp(10) or math.sqrt(10)
>
>Or, on the other hand, you can use the explicity form of import statement
>(from <modulename> import object) if you don't want use the form above. See
>below:
>
>from math import exp,sqrt
>exp(10)
>sqrt(4)
>
>-----Mensagem original-----
>De: gombosk at vas.birosag.hu [mailto:gombosk at vas.birosag.hu] 
>Enviada em: quinta-feira, 10 de janeiro de 2002 07:00
>Para: Jason Orendorff
>Cc: python-list at python.org
>Assunto: math module
>
>
>
>I have a problem with math module:
>
>I import math module, because to call exp(x) or sqrt(x) does not work.
>
>Do I need anything else to do?
>
>>>> import math
>>>> exp(10)
>Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>NameError: name 'exp' is not defined
>
>This is the problem...
>
>Katalin
>
>
>-- 
>http://mail.python.org/mailman/listinfo/python-list
>
>------_=_NextPart_001_01C199CB.EEA8B850
>Content-Type: text/html;
>	charset="ISO-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
><HTML>
><HEAD>
><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
>charset=3DISO-8859-1">
><META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
>5.5.2653.12">
><TITLE>ENC: math module</TITLE>
></HEAD>
><BODY>
>
><P><FONT SIZE=3D2>Yes, You must use the complete reference to the =
>object <modulename.object> just like this:</FONT>
></P>
>
><P><FONT SIZE=3D2>import math</FONT>
><BR><FONT SIZE=3D2>math.exp(10) or math.sqrt(10)</FONT>
></P>
>
><P><FONT SIZE=3D2>Or, on the other hand, you can use the explicity form =
>of import statement (from <modulename> import object) if you =
>don't want use the form above. See below:</FONT></P>
>
><P><FONT SIZE=3D2>from math import exp,sqrt</FONT>
><BR><FONT SIZE=3D2>exp(10)</FONT>
><BR><FONT SIZE=3D2>sqrt(4)</FONT>
></P>
>
><P><FONT SIZE=3D2>-----Mensagem original-----</FONT>
><BR><FONT SIZE=3D2>De: gombosk at vas.birosag.hu [<A =
>HREF=3D"mailto:gombosk at vas.birosag.hu">mailto:gombosk at vas.birosag.hu</A>=
>] </FONT>
><BR><FONT SIZE=3D2>Enviada em: quinta-feira, 10 de janeiro de 2002 =
>07:00</FONT>
><BR><FONT SIZE=3D2>Para: Jason Orendorff</FONT>
><BR><FONT SIZE=3D2>Cc: python-list at python.org</FONT>
><BR><FONT SIZE=3D2>Assunto: math module</FONT>
></P>
><BR>
><BR>
>
><P><FONT SIZE=3D2>I have a problem with math module:</FONT>
></P>
>
><P><FONT SIZE=3D2>I import math module, because to call exp(x) or =
>sqrt(x) does not work.</FONT>
></P>
>
><P><FONT SIZE=3D2>Do I need anything else to do?</FONT>
></P>
>
><P><FONT SIZE=3D2>>>> import math</FONT>
><BR><FONT SIZE=3D2>>>> exp(10)</FONT>
><BR><FONT SIZE=3D2>Traceback (most recent call last):</FONT>
><BR><FONT SIZE=3D2>  File "<stdin>", line 1, in =
>?</FONT>
><BR><FONT SIZE=3D2>NameError: name 'exp' is not defined</FONT>
></P>
>
><P><FONT SIZE=3D2>This is the problem...</FONT>
></P>
>
><P><FONT SIZE=3D2>Katalin</FONT>
></P>
><BR>
>
><P><FONT SIZE=3D2>-- </FONT>
><BR><FONT SIZE=3D2><A =
>HREF=3D"http://mail.python.org/mailman/listinfo/python-list" =
>TARGET=3D"_blank">http://mail.python.org/mailman/listinfo/python-list</A=
>></FONT>
></P>
>
></BODY>
></HTML>
>------_=_NextPart_001_01C199CB.EEA8B850--
>




More information about the Python-list mailing list