我在中间进行基本的种族选择输入。
userInput = input
print ('I choose a(n)', userInput)
if userInput is ('Human'):
input ('I like Humans, help that I am one')
if userInput is ('Orc'):
print ('Hate orcs, I dont like green :(')
if userInput is ('Android'):
print ('Robots are cool, so by theory Androids are too')
else:
print ('Try Again')
但输出很奇怪......
I choose a(n) <built-in function input>
Try Again
查看脚本问题?我认为它不等待输入,因为没有输入,它只是说'再试一次',但我不完全确定如何解决这个问题。 这可能很容易解决,但老实说我不知道:(
答案 0 :(得分:2)
尝试
userInput = input()
即input()
是函数调用