[Tutor] Newbie

Sam Last Name the_sam_smart at yahoo.com
Fri Jul 25 03:47:32 CEST 2008


mmmkay its me again
Iv'e been learning alot and have found so much joy in making programs that solve equations using the input function.
I need Help on this though.
Im trying to make a program where it solves the quadratic formula when you put in the variables. 
Here wats i got so far. :) and also, is there a function for square root? 

a  =  input("What is the variable a?")
b  =  input("What is the variable b?")
c  =  input("What is the variable c?")
# this is where i need help :(
print -b + /sqrt (b*b - 4*a*c)/(2*a) 
# this of course doesn't work i believe because i don't have the square root function and don know how to make one

Feedback appreciated :)


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080724/b02787c9/attachment-0001.htm>


More information about the Tutor mailing list