Python theory
Python theory
This keeps track of how many tries the player has made. The
increment operator is attempts += 1 or simply attempts =
gs
attempts + 1.
python attempts += 1
if guess == secretnumber:
break
elif guess secretnumber:
printToo high
else:
printToo low
attempts += 1
printfYou guessed it The number was secretnumber printfIt took
you attempts attempts.
happy coding
gs