Skip to content

Commit

Permalink
Rock-paper-scissor updated
Browse files Browse the repository at this point in the history
  • Loading branch information
codeperfectplus committed Jan 24, 2020
1 parent a83c42f commit 26b2640
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Python Projects/Rock-Paper_sciosors Game.py

This file was deleted.

34 changes: 34 additions & 0 deletions Python Projects/rock_scissor_paper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import random
def f():
print("Your Turn")
print("choose:\n r for ROCK [0]\n p for PAPER [--]\n s for SCISSOR [8<]")
u = input()
a = ['r','p','s']
c = random.choice(a)

if u=='r':
if c=='r':
print(" You both chosen ROCK \n Its a DRAW")
elif c=='p':
print(" You chosen ROCK \n Computer chosen PAPER \n You Lose")
elif c=='s':
print(" You chosen ROCK \n Computer chosen SCISSOR \n You Win")
elif u=='p':
if c=='p':
print(" You both chosen PAPER \n Its a DRAW")
elif c=='r':
print(" You chosen PAPER \n Computer chosen ROCK \n You Win")
elif c=='s':
print(" You chosen PAPER \n Computer chosen SCISSOR \n You Lose")
elif u=='s':
if c=='s':
print(" You both chosen SCISSOR \n Its a DRAW")
elif c=='p':
print(" You chosen SCISSOR \n Computer chosen PAPER \n You Win")
elif c=='r':
print(" You chosen SCISSOR \n Computer chosen ROCK \n You Lose")
else:
print("Please chose the right option this time")
f()

f()

0 comments on commit 26b2640

Please sign in to comment.