string - python print invalid syntax -
print (n+1) ": x1= ",x1,"f(x)= ",fx
i want print x1 , value of function @ x1 (fx), invalid syntax on end of first quotation. can explain me problem is.
the problems
there should comma(,) before 1st quotation.
print (n+1), " : x1=",x1,"f(x)=",fx
- printing f(x) print correct value if have return statement in function
Comments
Post a Comment