小编Cal*_*s34的帖子

使用print时语法错误无效

我收到一个错误

invalid syntax
Run Code Online (Sandbox Code Playgroud)

当我运行以下代码时:

print("Hello how old are you?(years)"
print ("(1) 0-10")      
print ("(2) 11-20")
print ("(3) 21-30")
print ("(4) 31-40")
print ("(5) 41-50")
print ("(6) 51-60")
print ("(7) 61-70")
print ("(8) 71-80")
print ("(9) 81-90")
print ("(10)90+")
  c=input
  if int(c)==1
print ("")
Run Code Online (Sandbox Code Playgroud)

在这条线上

print ("(1) 0-10")
Run Code Online (Sandbox Code Playgroud)

它说打印是一种无效的语法,如果我删除它移动到下一行,依此类推.我能在这里得到一些帮助吗?谢谢!

python printing

1
推荐指数
1
解决办法
277
查看次数

标签 统计

printing ×1

python ×1