Python - 打印(" abc")给出语法错误

时间:2016-04-18 16:04:56

标签: python syntax syntax-error

此打印功能出现语法错误,无法解决原因!

if teacher == "no":
    name = input("What is your name?")
    class_code = str(input("What class are you from? 1, 2 or 3?")
    print("Welcome to the Arithmetic Quiz, ",name)

感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

更改此行

class_code = str(input("What class are you from? 1, 2 or 3?")

class_code = str(input("What class are you from? 1, 2 or 3?"))