Hi guys, in this video I'm going to show you how to make a Rock, Paper and Scissors Game using python. so if you like this video, please Subscribe to my channel for more programming-like content.
#python
Code:-
#RockPaperScissors
import random
def play():
user = input("What is Your Choice. Rock , Paper or Scissors?: ")
computer = random.choice(['Rock', 'paper', 'Scissors'])
if user == computer:
return ("It's a Tie :/")
if is_win(user, computer):
return "You Won ! :)"
return "You Lost :("
def is_win(player, opponent):
if (player == "Rock" and opponent == "Scissors") or (player == "Scissors" and opponent == "paper") \
or (player == "paper" and opponent == "Rock"):
return True
print(play())
Thank You For Watching :)
In questa pagina del sito puoi guardare il video online How To Make a Rock, Paper and Scissors Game | Using Python | Beginners Python Project | della durata di ore minuti seconda in buona qualità , che l'utente ha caricato ProrammingWith Somesh 15 giugno 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 35 volte e gli è piaciuto 7 spettatori. Buona visione!