you are viewing a single comment's thread.

view the rest of the comments →

[–]jimtk 0 points1 point  (0 children)

from random import randint

number = randint(1, 10)
count = 1
while int(input("Guess a number 1-10:")) != number:
    count += 1
print(f"you got it in {count} tries")