""" ------------------------------------------------- Project: Guessing Game Standard: 91883 (AS1.7) v.1 School: Tauranga Boys' College Author: Dexter Adam Bollen Date: THE DATE YOU COMPLETED THE CODE Python: 3.5 ------------------------------------------------- """ import random print ("You have been walking through a hot forest for hours.") time.sleep(1) print ("In the distance, you can see a old man sitting next to a tree.") time.sleep(1) print ("You walk towards the man.") time.sleep(1) print ("As you aproach, he looks up at you.") time.sleep(1) print("Hello! Would you like to play a game with me?") time.sleep(1) print("You nod.") time.sleep(1) print("To play the game, I will think of a number from 1 to 1000. You will have 10 guesses to figure out what number I am thinking of.") time.sleep(1) player = input( "Before we begin, please tell me your name!") print ("Welcome to the guessing games,", player ) time.sleep(1) print("Oh and one last thing. These are magic dice, its the reason they go to 1000. Also, if you cant guess the number in time...") time.sleep(2) print("You die.") time.sleep(2) print("The man starts chanting in an ancient language, and the forest goes dark. The enviroment around you has completely changed, and you are now in a cave.") time.sleep(2) print("He clapped his hands and then said,") time.sleep(0.8) print("I have my number.") time.sleep(0.5) player_points = 0 oldman_points = 0 max_tries = 10 for stage in range(1, max_tries + 1): print("\n==="+ str(stage) +"===") correct_num = random.randint(1,10) chances = 10 attempt = int(input("Enter your guess ")) won = False for turn in range(1, chances + 1): if attempt < correct_num: print("TOO LOW!") elif attempt > correct_num: print("TOO HIGH!") else: print("CONGRATULATIONS TRAVELER! THE NUMBER WAS", correct_num) time.sleep(45575434) won = True break