Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while user_input != "e":
- while True: # checking and reacting on first input
- user_input = input("Enter n to deal a new hand, r to replay the last hand, or e to end game: ")
- try:
- if user_input not in ('n', 'r', 'e'):
- raise Exception
- except Exception:
- print("Invalid command.")
- print("")
- else:
- try: # What if HAND is empty and it can not REPLAY
- REMOVED CODE
- # Handle exception
- if user_input == "e":
- break
- while True: # checking and reacting on second input
- user_input2 = input("Enter u to have yourself play, c to have the computer play:")
- try:
- REMOVED CODE
- # if inputs are correct continue below
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement