I am trying to build a code that spits out y given f(x). Apparently, mine isn\'t working. Can you please help?
def f(n):
\'\'\'The Function\'\'\'
return
Use this:
return (-5*(n**5))+(69.0*(n**2))-47
The algebraic notation you are using i.e. omitting the '*'
sign causes python to think that you are trying to make a function call:
69.0(n**2) # python thinks 69.0 is a function name and n**2 is the parameter of this call
That is why the '*'
operator is necessary, between two operands.