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

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -