My variables aren't comparing to each other. Is it because it is in a class, or is there some other problem?
import random
def game():
result = random.uniform(1, 10)
get = input("I'm thinking of a number, 1-10")
if get == result:
print("GG, the number was" + result)
game()
if get != result:
print("That wasn't my number. My number was" + result + "Let's try again.")
game()
game()
Aucun commentaire:
Enregistrer un commentaire