How To Make a Rock, Paper and Scissors Game | Using Python | Beginners Python Project |

Publicado el: 15 junio 2021
en el canal de: ProrammingWith Somesh
35
7

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 :)


En esta página del sitio puede ver el video en línea How To Make a Rock, Paper and Scissors Game | Using Python | Beginners Python Project | de Duración hora minuto segunda en buena calidad , que subió el usuario ProrammingWith Somesh 15 junio 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 35 veces y le gustó 7 a los espectadores. Disfruta viendo!