Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- code = random.randint(1000,9999)
- cmd = 0
- attempts = 30
- puzzle1 = 1
- puzzle2 = 0
- while puzzle1 == 1:
- cmd = int(input(">>> "))
- if cmd > code:
- print("Too high!")
- attempts = attempts - 1
- print(attempts)
- if cmd < code:
- print("Too low!")
- attempts = attempts - 1
- print(attempts)
- if cmd == code:
- print("Access granted!")
- puzzle1 = 0
- puzzle2 = 1
- while puzzle2 == 1:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement