Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # this will be a game that generates a random number for u to guess
- import random, sys
- winningnumber=random.randint(1,20)
- print ("Hey whats your name brah?")
- name=input()
- print("So " + name + " would you like to play a game?")
- playans=input()
- if playans == "yea" or "yes":
- print("cool im thinking of a number between 1 and 20 think you guess it?")
- else:
- print("fine.....queer")
- sys.exit
- for guessestaken in range(1,7):
- guess=input()
- guess = int(guess)
- if guess < winningnumber:
- print("Nah too low")
- elif guess > winningnumber:
- print("nope too high")
- elif guess == winningnumber:
- print("yea lucky guess")
- sys.exit()
- else:
- break
- print("Sorry LOSER")
- #If I don't convert the guess to a integer my self Python errors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement