Created
April 21, 2020 00:10
-
-
Save calthoff/cc7e957d7f8615ee6cae3a0e6ea84f14 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| rps_dict = {"rock": "scissors", "paper": "rock", "scissors": "paper"} | |
| rps = input("please type rock, paper, or scissors \n") | |
| computer_choice = random.choice(list(rps_dict.keys())) | |
| if rps == computer_choice: | |
| print("You both picked {} it is a tie!".format(rps)) | |
| elif rps_dict[rps] == computer_choice: | |
| print("You picked {} and the computer picked {}. You win!".format(rps, computer_choice)) | |
| else: | |
| print("You picked {} and the computer picked {}. You lose!".format(rps, computer_choice)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment