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

Published: 15 June 2021
on channel: 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 :)


On this page of the site you can watch the video online How To Make a Rock, Paper and Scissors Game | Using Python | Beginners Python Project | with a duration of hours minute second in good quality, which was uploaded by the user ProrammingWith Somesh 15 June 2021, share the link with friends and acquaintances, this video has already been watched 35 times on youtube and it was liked by 7 viewers. Enjoy your viewing!