Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

I am having problems with this Python program I am creating to do maths, working out and so solutions but I'm getting the syntax error: "unexpected character after line continuation character in python"

this is my code

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

My problem is with \1.5 I have tried \1.5 but it doesn't work

Using Python 2.7.2

1 Answer

0 votes
by (106k points)

You are using the wrong operator for the division, the right operator for division is /, not \.

Related questions

0 votes
1 answer
+1 vote
3 answers
asked Oct 3, 2019 in Python by Sammy (47.6k points)
0 votes
0 answers
asked Dec 31, 2020 in Python by shashu (120 points)

Browse Categories

...