Unable to solve a Python error message -


For the "Introduction to Program" course. The code from the lecture notes of Polarari-Malmi is:

  DIF (main): Print "Ozlma Laski Assentolanan Cucocuerate." Rivi = raw_input ( "Anna lainasumma:") lainasumma = float (Rivi) Rivi = raw_input ( "Ana Laina- Aika vuosina:") laina_aika = int (Rivi) If laina_aika & LT; 1: print "liian lyhyt Laina-Aika" rest: kk_lkm = 12 * laina_aika Rivi = raw_input ( "Anna korkoprosentti:") korko = float (Rivi) lyhennys = lainasumma / kk_lkm paaoma = lainasumma i = 0 print "lyhennys korko yhteensa" While I & lt; kk_lkm: i = i + 1 = korkoera korko / 1200.0 * paaoma paaoma = paaoma - lyhennys kuukausiera = korkoera + lyhennys Print ".% 2% 8.2f% 8.2f% 8.2f"% \ # mistake probably here (I, lyhennys, korkoera, kuukausiera) main ()  

I syntax error is

  syntax error: line continuation character  after unexpected character 

How can you solve the error message?

Many answers have already been given You are the root of your problem, but I When possible, I want to plug a plug for my favorite way to achieve logical line continuity in Python.

  print "% 2% 8.2f% 8.2f% 8.2f"% (# Make no mistake I, lyhennys, korkoera, kuukausiera)  

or , rather than the advice of some answers as to use additional brackets, you gain can be taken before any of you bracket is near Natura Lly - he even need a logical line of continuity that will tell the dragon; -)


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -