python
Dashboard
My Repos
Compilers
Python Online
Node JS Online
Golang Online
codepy
Login
My Repos
Sign Out
Online Python Interpreter
Stop
Run
# paper scissors gamE USing. python import random def game(player): rps = ["Rock" , "Paper" , "Scissors"] computer = rps[random.randint(0,2)] if player == computer: return "Tie! computer "+computer elif player== "Rock": if computer == "Paper": return "You lose! computer choose " + computer else: return "You win! computer choose + computer elif player == "Paper": if computer == "Scissors": return "You Lose! computer choose "+ computer else: return "You win! computer choose " + computer elif player == "Scissors": if computer == "Rock": return "You lose computer choose "+ computer else: return "You win! computer choose " + computer else: return "May be you have made any typo" print(game( "Rock"))
Share this code with others
Public
Clear
My Repos
Repo
Lang
Login
Register
Login
Create a free account. No Credit card info required.
I agree with the Codepy
Term of Service
Sign Up