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

  1. there should comma(,) before 1st quotation.

    print (n+1), " : x1=",x1,"f(x)=",fx

  2. printing f(x) print correct value if have return statement in function

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -