Created
August 8, 2018 03:26
-
-
Save chookity-pokk/168cf266455f872900d80555122df07d to your computer and use it in GitHub Desktop.
Rock Paper Scissors in Python3
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
#!/bin/python3 | |
from random import randint | |
player = input('rock (r), paper (p), scissors (s)') | |
print(player, 'vs', end=' ') | |
chosen = randint(1,3) | |
#print(chosen) | |
if chosen == 1: | |
computer = 'r' | |
elif chosen == 2: | |
computer = 'p' | |
else: | |
computer = 's' | |
print(computer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment