Need help (Basic python)...what did I do wrong?

Paul Rubin http
Sat Oct 28 18:04:58 CEST 2006


"frankie_85" <steveadi at gmail.com> writes:
> e_5 = math.sqrt(math.fabs(e)) + 5((math.pow(e,3)))
> 
> but I still don't understand though why the variable a, b, c, d, e
> becomes an int type even though I have already specified the user input
> to be floating point?

if you want to multiply two numbers you need to put a * between them.
* is the multiplication symbol in Python and most other languages.

When you say f(x) that says "there is a function x and Python should
call it on the value x".  When you say 5(x), that says "there is
a function 5 and Python should call it with the value x".  And then
when you try to actually do that, Python says "hey I can't do that,
5 isn't a function, it's an integer".




More information about the Python-list mailing list