""" ------------------------------------------------- Project: Take-Away Game Standard: 91883 (AS1.7) v.1 School: Tauranga Boys' College Author: Harvey Lee Church Date: 7/03/25 Python: 3.5 ------------------------------------------------- """ set reset_guesses = 0 rounds = 3 user_score = 0 AI_score = 0 round_won = True round = 1 print("=================================================================") print("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++") print("=================================================================") print("Welcome to Guess The Number.") from time import * from random import * import os,sys,random name =input("What Is Your Name?") print("Hello", name, "It's now time to guess a number.") print("We each get 10 guesses per round.", "Best out Of 3 wins nothing ") sleep(2) print("Rules have partially been explained to you, Don't break them...") print("You have to guess a random number between 1 - 100.") sleep(3) print("Let's Start") random_number = random.randint(1,100) guess = int(input("Enter Your Guess: ")) if guess == random_number : print ("Spectacular Job", name) else: print("Try Again") random_number = random.randint(1,100) guess = int(input("Enter Your Guess: ")) if guess == random_number : print("Nice one", name) else: print("Ok, Thats fine. You've got this") sleep (2) print("Your Final Guess", name) random_number = random.randint(1,100) guess = int(input("Enter Your Guess: ")) if guess == random_number : print("Nice one", name) print(f"Sorry you've run out of guesses. The correct number is", (random_number)) if guess == random_number : print ("Nice one would you like to play again?") else: print ("Seems like you lost, You wanna play again?") question = input ("So? Do you wanna? ").lower() if question == "no": print ("Thanks for playing! Have a good one!") if question == "yes": round = 1 user_score = 0 AI_score = 0 print("Starting A New Round...") sleep(5) random_number = random.randint(1,100) guess = int(input("Enter Your Guess: ")) if guess == random_number : print("Nice one", name) print(f"Sorry you've run out of guesses. The correct number is", (random_number)) if guess == random_number : print ("Nice one would you like to play again?") else: print ("Seems like you lost, You wanna play again?") question = input ("So? Do you wanna? ").lower() if question == "no": print ("Thanks for playing! Have a good one!") if question == "yes": round = 2 user_score = 0 AI_score = 0 print("Starting A New Round...") sleep(5) random_number = random.randint(1,100) guess = int(input("Enter Your Guess: ")) if guess == random_number : print("Nice one", name) print(f"Sorry you've run out of guesses. The correct number is", (random_number)) if guess == random_number : print ("Nice one would you like to play again?") else: print ("Seems like you lost, You wanna play again?") question = input ("So? Do you wanna? ").lower() if question == "no": print ("Thanks for playing! Have a good one!") if question == "yes": round = 3 user_score = 0 AI_score = 0