语法错误:"python中的行继续字符后的意外字符";数学 [英] syntaxerror: "unexpected character after line continuation character in python" math
本文介绍了语法错误:"python中的行继续字符后的意外字符";数学的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在创建该Python程序时遇到了问题,我正在做数学,求解等解决方案,但出现语法错误:"python中的行继续符后出现意外字符"
I am having problems with this Python program I am creating to do maths, working out and so solutions but I'm getting the syntaxerror: "unexpected character after line continuation character in python"
这是我的代码
print("Length between sides: "+str((length*length)*2.6)+" \ 1.5 = "+str(((length*length)*2.6)\1.5)+" Units")
我的问题是 \ 1.5 我尝试了 \ 1.5 ,但它不起作用
My problem is with \1.5 I have tried \1.5 but it doesn't work
使用python 2.7.2
Using python 2.7.2
推荐答案
除法运算符是/
,而不是\
The division operator is /
, not \
这篇关于语法错误:"python中的行继续字符后的意外字符";数学的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文