#----------------------------------- # project: guess the number # standard: 91883 (as1.7) v.1 # school: TBC # author: cody smeed # date: # python: 3.5 #----------------------------------- import random import time #setup reset_guesses = 0 rounds = 3 user_score = 0 AI_score = 0 round_won = True round = 1 #intro print(" welcome to guess the number") time.sleep(2) print("I'm your host bucky") time.sleep(2) while True: user_name = input("now user what is your name?") if user_name.isalpha() == True: break else: print("that not a name try again") print("welcome " + user_name + " to my gameshow") time.sleep(2) print("here how it works") time.sleep(2) print("I choose a number and you got to guess it from 1 to 1000") time.sleep(2) print("if you get it right you get a point get 2 and you win") time.sleep(2) print("but if run out of guesses two times I win and you will be dunk in acid") time.sleep(2) print("so lets begin") #game while round <3: round_win = False guesses = reset_guesses print("round") print(round) print("player point") print(user_score) print("bucky points") print(AI_score) number = random.randint(1,1000) while guesses <10: guess = int(input("ok guess the number")) print(guesses) if guess < number: print("no it higher") elif guess > number: print("no it lower") else: print("that right the number is ", number) user_score += 1 break if guesses == 10: ("your out I win") AI_score +=1 ("lets go again") break else: guesses +=1 if user_score or AI_score == 2: break elif round == 3: break else: round += 1