#------------------------------------------------- #Project: Take-Away Game #Standard: 91883 (AS1.7) v.1 #School: Tauranga Boys' College #Author: Santosh Chitturi #Date: THE DATE YOU COMPLETED THE CODE #Python: 3.5 #------------------------------------------------- #imports import random import time #varibles reset_guesses = 0 rounds = 3 user_score = 0 AI_score = 0 round_won = True round = 1 AI_number = random.randint(1, 1000) guesses = 0 #intro print("Hi, I'm Billy the Computer, welocome to GUESS THE NUMBER!!") name = input("May I have your name please: ") time.sleep(0.66) print() print("hello", name) print("Welcome to the Guess the Number!!", name, "this is how you play the game, all you") time.sleep(3) print("have to do is guess the number I'd generated. You get ten rounds to guess the number") time.sleep(3) print("if you guess a number and it's not the number I will either say higher or lower depending the number, also you have 10 guesses or i get a piont.") while True: your_number = int(input("I'm thinking of a number from 1 to 1000, guess the number?")) if AI_number > your_number: print("your number is lower than mine ") guesses = guesses + 1 elif AI_number < your_number: print("your number is biger than mine") guesses = guesses + 1 else: print("CONGRATULATION YOU'VE GUESSED THE NUMBER THAT I WAS THINK YOU WIN A SIGUALR POINT") user_score = user_score + 1