python空闲向print()函数抛出一个错误,我不知道为什么会出现代码。。在
password = "cow"
name = input()
input("MR PENGUIN: hello there i am Mr Penguin what is your name? ")
input("well, hello there"+name+"Tell me your password")
input("You: my password is, ")
input("MR PENGUIN: im little defh could you repeat that? ")
input("YOU: my password is, "
print("PC POLICE: STOP! dont ever trust penguins with your data becuase he just told every one that your password is "+ password)
input("Press Enter To Exit")
这是因为上一行中的
input
语句缺少一个结束的妄想。在它应该是:
而不是
^{pr2}$上一行的
input
末尾缺少一个括号。在更改:
收件人:
^{pr2}$你的
print
还行。请注意,当您得到一个神秘的错误时,它通常是在上一行上的内容。在相关问题 更多 >
编程相关推荐