I'm trying to make a warmer / colder game in python as a project. Currently, when I open the program it closes immediately despite there being several loops and inputs. I have spent a good 2 hours on it, and I can't figure it out. Any tips?
import random
Correct = random.randint(1, 100)
Oldval = 50
Newval = 50
while Newval != Correct:
Newval = Newval + input("How much do you want to move?")
if (Newval - Correct) > (Oldval - Correct):
print("Colder!")
else:
print("Warmer!")
Oldval = Newval
Win = input(You Win!)
Aucun commentaire:
Enregistrer un commentaire