def Forest(Health,Hunger):
print'You wake up in the middle of the forest'
Inventory = 'Inventory: '
Squirrel = 'Squirrel'
while True:
Choice1 = raw_input('You...\n')
if Choice1 == 'Life' or 'life':
print('Health: '+str(Health))
print('Hunger: '+str(Hunger))
elif Choice1 == 'Look' or 'look':
print 'You see many trees, and what looks like an edible dead Squirrel, \na waterfall to the north and a village to the south.'
elif Choice1 == 'Pickup' or 'pickup':
p1 = raw_input('Pickup what?\n')
if p1 == Squirrel:
if Inventory == 'Inventory: ':
print'You picked up a Squirrel!'
Inventory = Inventory + Squirrel + ', '
elif Inventory == 'Inventory: Squirrel, ':
print'You already picked that up!'
else:
print"You can't find a "+str(p1)+"."
elif Choice1 == 'Inventory' or 'inventory':
print Inventory
You... と表示されたら、Life、Pickup、Look、または Inventory のいずれかを入力できるようにしようとしています。このプログラムにはもっと多くのコードがありますが、その一部を示しています。しかし、実行するたびに、「Pickup」、「Look」、または「Inventory」と入力しても、常に「Life」の部分が表示されます。助けてください!ありがとう、ジョン
編集:それは単なる間隔の問題だと思いますが、以前はうまく動作していたかどうかはわかりません...