Hello, you have to use the same parameter, not self which is used in classes
def squareroot(n):
return sqrt(n)
--
Adrián Espinosa.
Engineering Support, Wholesale Systems.
Jazztel.com
De: [email protected] [mailto:[email protected]]
Enviado el: miércoles, 09 de enero de 2013 22:06
Para: [email protected]
Asunto: new to python and programming at large
pls I want to write a function that can compute for the sqrt root of any
number.bt it not working pls help.
from math import sqrt
def squareroot(self):
x = sqrt(y)
print x
________________________________
--------------------------------------------------------------------------------
Este mensaje es privado y CONFIDENCIAL y se dirige exclusivamente a su
destinatario. Si usted ha recibido este mensaje por error, no debe revelar,
copiar, distribuir o usarlo en ningún sentido. Le rogamos lo comunique al
remitente y borre dicho mensaje y cualquier documento adjunto que pudiera
contener. El correo electrónico via Internet no permite asegurar la
confidencialidad de los mensajes que se transmiten ni su integridad o correcta
recepción. JAZZTEL no asume responsabilidad por estas circunstancias. Si el
destinatario de este mensaje no consintiera la utilización del correo
electrónico via Internet y la grabación de los mensajes, rogamos lo ponga en
nuestro conocimiento de forma inmediata.Cualquier opinión expresada en este
mensaje pertenece únicamente al autor remitente, y no representa necesariamente
la opinión de JAZZTEL, a no ser que expresamente se diga y el remitente esté
autorizado para hacerlo.
--------------------------------------------------------------------------------
This message is private and CONFIDENTIAL and it is intended exclusively for its
addressee. If you receive this message in error, you should not disclose, copy,
distribute this e-mail or use it in any other way. Please inform the sender and
delete the message and attachments from your system.Internet e-mail neither
guarantees the confidentiality nor the integrity or proper receipt of the
messages sent. JAZZTEL does not assume any liability for those circumstances.
If the addressee of this message does not consent to the use of Internet e-mail
and message recording, please notify us immediately.Any views or opinions
contained in this message are solely those of the author, and do not
necessarily represent those of JAZZTEL, unless otherwise specifically stated
and the sender is authorised to do so.
--------------------------------------------------------------------------------
--
http://mail.python.org/mailman/listinfo/python-list