We continue to improvise guessing game,
Added
- Choice for user to repeat guess
- Counter to determine how many times user guessed
- Hint for user to narrow down guess
import random
secretnumber = random.randint(1,10)
count=0
while True:
count=count+1
myinput = int(input('Enter your guess?'))
if myinput == secretnumber :
print('You got it!!!')
break
if secretnumber > myinput :
print('Guess way more than that')
if secretnumber < myinput :
print('TOO MUCH! TOO MUCH!')
print('Computer guess is',secretnumber)
print('You guessed it in ', count, 'times')
