Aarush's Guessing Game (with stats)

This is my 2nd project called "The Guessing Game."

import random scoreList = [] question1 = "yes" while question1 == "yes": n = random.randint (1,99) print ("This is the guessing game.") guess = 0 numberOfGuesses = 0 totalNumberOfGames = 0 while n!= guess: guess = int(input("What is your guess between 1 and 99?")) numberOfGuesses = numberOfGuesses + 1 if guess < n: print ("Your guess is lower than the random number.") elif guess > n: print ("Your guess is higher than the random number.") else: print ("Your guess is correct!") totalNumberOfGames = totalNumberOfGames + 1 scoreList.append(numberOfGuesses) question1 = input ("Do you want to play again?") print ("Total number of games:", len(scoreList)) sum = 0 for i in scoreList: sum+=i sum/=len(scoreList) print("Average guesses per game:", sum) lowestNumber = scoreList[0] for i in scoreList: if lowestNumber > i: lowestNumber = i print ("Best Game:", lowestNumber)
1