""" ------------------------------------------------- Project: Take-Away Game Standard: 91883 (AS1.7) v.1 School: Tauranga Boys' College Author: JINDPREET SINGH Date: THE DATE YOU COMPLETED THE CODE Python: 3.5 ------------------------------------------------- """ import time Name = input("what is your name?") print("hello", Name, "it is time to geuss the number") time.sleep(2) print("welcome to the geussing game this will be played in 3 rounds, your avbjective is to geuss a random number from 1-1000. you will get 10 geusses per round") import random def guess_number(): # Generate a random number between 1 and 100 secret_number = random.randint(1, 100) # Initialize the number of attempts attempts = 0 while True: # Ask the user to guess the number guess = int(input("Guess a number between 1 and 1000: ")) attempts += 1 # Check if the guess is correct if guess == secret_number: print(f"Congratulations! You guessed the number in {attempts} attempts.") break elif guess < secret_number: print("Try again. The number is higher.") else: print("Try again. The number is lower.") # Call the function to start the game guess_number()