Rock Papper Scissor Project in Python
Rock Papper Scissor Project in Python
Note : Recplace (greater than) and (less than) with their sign/symbol ( Because Youtube donot allow angle brackets in description ) OR You can get this code on github by using github link
Code github Link : https://github.com/ubaidahmadceh/python_projects/blob/main/Rock_Papper_Scissor.py
code :
from random import randint
user_choice = int(input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors.\n"))
computer_choice = randint(0, 2)
print(f"Computer chose: {computer_choice}")
if user_choice (greater than)= 3 or user_choice (less than) 0:
print("You typed an invalid number, you lose!")
elif user_choice == 0 and computer_choice == 2:
print("You Win")
elif computer_choice == 0 and user_choice == 2:
print("You lose")
elif computer_choice (greater than) user_choice:
print("You lose")
elif user_choice (greater than) computer_choice:
print("You Win")
elif computer_choice == user_choice:
print("It's a draw")
project in python,rock paper scissors tutorial,rock paper scissors,scissors paper rock game in python,play rock paper scissors against computer,python rock paper scissors,game in python,project in c,programming rock paper scissors,how to code rock paper scissors,code in python,create an app for free,advanced tutorials of python,python project,sotware learnign for free,app making software,gaming project,website building using python,c programming,python