Sri*_*P S -5 python printing concatenation syntax-error
xString = input("Enter a number: ")
x = int(xString)
yString = input("Enter a second number: ")
y = int(yString)
print('The sum of ', x, ' and ', y, ' is ', x+y, '.', sep='')
Run Code Online (Sandbox Code Playgroud)
在执行上面的代码时,解释器抛出语法错误,说法语错误如下.
print(?The sum of ?, x, ? and ?, y, ? is ?, sum, ?.?, sep=??)
Run Code Online (Sandbox Code Playgroud)
SyntaxError:语法无效
归档时间: |
|
查看次数: |
95 次 |
最近记录: |