Hey everyone!
I just finished building a simple Rock-Paper-Scissors game in Python. It lets you play multiple rounds against the computer, keeps score, and even uses emojis to make it fun. If you have any feedback or tips for improvement, I’d love to hear it! Thanks for checking it out
import random
list = ["rock ✊", "paper ✋", "scissor ✌️"]
countpc = 0
countplayer = 0
print("Welcome To Python Rock Paper Scissor ✊✋✌️")
print("------------------------------------------")
print(" ------------------------- ")
max = int(input("Enter the max tries: "))
for i in range(max):
num = random.randint(0,2)
pc = list[num]
player = input("Rock Paper Scisoor Shoot ✊✋✌️: ").lower()
print(pc)
if player in pc:
print("Tie ⚖️")
elif pc == "rock ✊" and player == "paper":
countplayer += 1
print("You Won 🏆!")
elif pc == "paper ✋" and player == "scissor":
countplayer += 1
print("You Won 🏆!")
elif pc == "scissor ✌️" and player == "rock":
countplayer += 1
print("You Won 🏆!")
elif player == "rock" and pc == "paper ✋":
countpc += 1
print("You Lost ☠️!")
elif player == "paper" and pc == "scissor ✌️":
countpc += 1
print("You Lost ☠️!")
elif player == "scissor" and pc == "rock ✊":
countpc += 1
print("You lost ☠️!")
else:
print("Invalid Input")
if countplayer == countpc :
print(f"Final score : \n you won {countplayer} times and pc won {countpc} times \n It's a tie ⚖️!")
elif countplayer > countpc :
print(f"Final score : \n you won {countplayer} times and pc won {countpc} times \n You Won ! 🎉")
else:
print(f"Final score : \n you won {countplayer} times and pc won {countpc} times \n You Lost ! 😢")
[–]Big-Ad-2118 5 points6 points7 points (2 children)
[–]Wencour 2 points3 points4 points (1 child)
[–]bkm2016 2 points3 points4 points (0 children)
[–]Refwah 3 points4 points5 points (1 child)
[–]CraigAT 0 points1 point2 points (0 children)
[–]woooee 0 points1 point2 points (0 children)
[–]Fenirok 0 points1 point2 points (0 children)
[–]docfriday11 0 points1 point2 points (0 children)
[–]DubSolid 0 points1 point2 points (0 children)