Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def GuessingGame(a = 7, b = 18):
- print "I'm thinking of a number between", a, "and", b
- d = 0
- contador = 0
- c = random.randrange(a,b)
- while c != d:
- e = input ("Enter a number: ")
- d = int(e)
- contador += 1
- print "Correct. It only took you", contador, "tries!"
- GuessingGame()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement