我只是一个初学者,所以请耐心等待,我的 if 和 print 语句有问题。有 3 个选择,A、B 或 C,这是 A:
g = 0
ge = ("Gold =")
gh = ("The amount of gold you have is:")
choice3 = input()
if choice3 == "A":
print("You slide him the coins through the bars.")(g = g - 5)(gh,g)("'Thanks!' He says. You manage to break out with him and escape to New Mexico, Well done, you win!")
这是我收到的错误消息:
A
You slide him the coins through the bars.
Traceback (most recent call last):
File "F:\Program Files (x86)\Python\Python stuff\Hello World.py", line 111, in <module>
print("You slide him the coins through the bars.")(g = g - 5)(gh,g)("'Thanks!' He says. You manage to break out with him and escape to New Mexico, Well done, you win!")
TypeError: 'NoneType' object is not callable