поместите его в цикл и сделайте отступ в операторах if правильно

ичок здесь, и в Python также .. Если if в следующем коде не работает. кто-нибудь знает почему? Это верблюжья игра, которую я должен представить к воскресенью.

import random
from Tkinter import *

print "Welcome to Camel!"
print "You have stolen a camel to make your way across the great Mobi desert."
print "The natives want their camel back",
print "and are chasing you down! Survive your"
print "desert trek and out run the natives."
print ""

summ = 0
done = False
miles = 0
thirst = 0
tiredness = 0
distance = 20
drinks = 3

window = Tk()
window.title("Camel")

def A():
global drinks
if drinks > 0:
drinks -= 1
thirst = 0
else:
print "You ran out of drinks!"
done = True

def B():
global summ, thirst, tiredness, distance
miles = random.randint(5, 12)
summ += miles
print "miles traveled: ", miles
print "Total miles traveled: ", summ
print ""
thirst += 1
tiredness += 1
distance -= random.randint(7, 14)
distance += miles

def C():
global summ, thirst, tiredness, distance
miles = random.randint(10, 20)
summ += miles
print "Miles traveled: ", miles
print "Total miles traveled: ", summ
print ""
thirst += 1
tiredness += random.randint(1, 3)
distance -= random.randint(7, 14)
distance += miles

def D():
global distance
tiredness = 0
print "Your Camel is happy."
print ""
distance -= random.randint(7, 14)

def E():
print "Total miles traveled: ", summ
print "Drinks in canteen: ", drinks
print "The natives are %i miles behind you." % (distance)
print ""

def Q():
exit()


A = Button(window, text = "A. Drink from your canteen.", command = A)
B = Button(window, text = "B. Ahead moderate speed.", command = B)
C = Button(window, text = "C. Ahead full speed.", command = C)
D = Button(window, text = "D. Stop for the night.", command = D)
E = Button(window, text = "E. Status check.", command = E)
Q = Button(window, text = "Q. Quit.", command = Q)
A.pack()
B.pack()
C.pack()
D.pack()
E.pack()
Q.pack()

if thirst > 4 and thirst <= 6:
print "You are thirsty."
print ""
elif thirst > 6:
print "You died of thirst!"
done = True
if tiredness > 5 and tiredness <= 8 and done != True:
print "Your camel is getting tired."
print ""
elif tiredness > 8 and done == False:
print "Your camel is dead."
done = True

if distance <= 0 and done != True:
print "The natives caught you."
done = True
elif distance < 15 and done != True:
print "The natives are getting close!"

if summ >= 200 and done == False:
print "You won!"
done = True

if random.randint(1, 100) <= 5 and done != True:
print "You found an oasis!"
print ""
thirst = 0
tiredness = 0
drinks = 3

window.mainloop()

Ответы на вопрос(1)

Ваш ответ на вопрос