fh1
Active Coder
Hello!!đź‘‹ So I made this rock paper scissors game and I wanted to see if anyone could preview it and maybe give some feedback or rate the game.
If anyone would like to do coding with me let me know (you’ll need replit)
Python:
import random
yourPoints = 0
botPoints = 0
while True:
choices = ["rock", "paper", "scissors"]
botChoice = random.choice(choices)
print("Rock, Paper, Scissors. Type them exactly how they are.")
playerChoice = input("Type in your choice: ")
playerChoice = playerChoice.lower()
if playerChoice not in choices:
print("Invalid input. Please enter rock, paper, or scissors.")
continue
print("Bot's choice:", botChoice)
print("Your choice:", playerChoice)
if botChoice == playerChoice:
print(f"Both players used {playerChoice}. So it's a tie!")
continue
elif playerChoice == "scissors":
if botChoice == "paper":
print("You win because scissors beat paper!")
yourPoints += 1
else:
print("You lost because rock crushes scissors.")
botPoints += 1
elif playerChoice == "rock":
if botChoice == "scissors":
print("You win because rock crushes scissors!")
yourPoints += 1
else:
print("You lost because paper covers rock.")
botPoints += 1
elif playerChoice == "paper":
if botChoice == "rock":
print("You win because paper covers rock!")
yourPoints += 1
else:
print("You lost because scissors cut paper.")
botPoints += 1
wannaPlay = input("Type Y to play again. Type N to end: ")
wannaPlay = wannaPlay.lower()
if wannaPlay not in ["y", "n"]:
print("Invalid input. Please enter Y or N.")
continue
if wannaPlay == "n":
break
print("Your points:", yourPoints)
print("Bot's points:", botPoints)