Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chookity-pokk/168cf266455f872900d80555122df07d to your computer and use it in GitHub Desktop.
Save chookity-pokk/168cf266455f872900d80555122df07d to your computer and use it in GitHub Desktop.
Rock Paper Scissors in Python3
#!/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