• Register
1 vote


I was trying to run a simple python program but I am getting this error “syntaxerror: unexpected character after line continuation character” every time. What could be the reason and possible solution?

print("Length between sides: "+str((length*length)*2.6)+" \ 1.5 = "+str(((length*length)*2.6)\1.5)+" Units")


12 7 7
15,250 points

Please log in or register to answer this question.

1 Answer

2 votes


I think you’ve messed up between backslash (\) and frontslash (/). Backslash (\) used for a new line or white space and the frontslash (/) used for division.

13 9 6
94,240 points

Related questions

0 votes
3 answers 1.9K views
Problem : My Python program is giving below error python unexpected character after line continuation character
asked Oct 22, 2019 peterlaw 6.9k points
0 votes
1 answer 392 views
Problem : I have spent over the 10 hours in finding the exception or the special character to find in the code but I am unable to find it. I have already checked every similar messages in here. I am facing below error: Syntaxerror: json.parse: unexpected character at line 1 ... my form after that I am sending all the inputs to the main.js to validate it. So, I am just looking for the third-eye.
asked Dec 23, 2019 alecxe 7.5k points
0 votes
1 answer 484 views
Problem : Currently I am facing some issues. I am trying to use C# with Json.NET. The problem is that I always get following error: {"Unexpected character encountered while parsing value: e. Path '', line 0, position 0."} So the way I amm using Json.NET is ... as follows: {"Unexpected character encountered while parsing value: e. Path '', line 0, position 0."} Does anyone have any solution on it?
asked Dec 9, 2019 alecxe 7.5k points
0 votes
1 answer 108 views
Problem: Recently I have joined the angular2 project. But now I am stuck with below listed errors. The errors occurred if I tried to send my JSON objects to my backend. It may be due a parsing of my JSON objects. I am very new to angualar so unable to find ... (core.umd.js:3971) at ZoneDelegate.invokeTask (zone.js:274) at Zone.runTask (zone.js:151) at XMLHttpRequest.ZoneTask.invoke (zone.js:345)
asked Aug 5, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 71 views
Problem: My code isn't running. In the console the error is &ldquo;Uncaught SyntaxError: missing ) after argument list&rdquo; but there are no missing ) I find. Here is my code below: var nav = document.getElementsByClassName('nav-coll'); for (var n = 0; n < button.length; n ... function(){ console.log('haha'); } }, false); }; I&rsquo;d be thankful to him if somebody pulls me up from here. Thanks.
asked Mar 9, 2020 Gavin 15.3k points
0 votes
1 answer 30 views
Hello house, I would like to know how to solve this Python SyntaxError: Non-ASCII character '\xe2' in file. Thanks
asked Oct 23, 2020 psandprop 2.4k points
0 votes
1 answer 504 views
Probem : I am getting bellow error new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
asked Nov 7, 2019 peterlaw 6.9k points
0 votes
1 answer 15 views
Problem: Compiler showed: File "temp.py", line 56 return result SyntaxError: 'return' outside function Where was I wrong?
asked Jan 9 Mashhoodch 5.7k points
0 votes
1 answer 18 views
Task: Read an integer N . For all non-negative integers i<N , print i2. if __name__ == '__main__': n = int(input()) if (n<=0) and (n>=20): print("Exit") else: for(i=0,i<=n,i++): print(i*i) I am getting below error File "solution.py", line 6 for(i=0,i<=n,i++): ^ SyntaxError: invalid syntax Exit Status 255
asked Oct 25, 2020 psandprop 2.4k points