this one was quite easy

import random

choices = ["rock", "paper", "scissors"]
user_score = 0
computer_score = 0
rounds = int(input("Enter the number of rounds you want to play: "))

for i in range(rounds):
    user_choice = input("Enter rock, paper, or scissors: ").lower()
    computer_choice = random.choice(choices)
    print(f"Computer played: {computer_choice}")
    print(f"You played: {user_choice}")

    if user_choice == computer_choice:
        print("It's a tie!")
    elif (user_choice == 'rock' and computer_choice == 'scissors') or \
         (user_choice == 'paper' and computer_choice == 'rock') or \
         (user_choice == 'scissors' and computer_choice == 'paper'):
        print("You win this round, no biggie")
        user_score += 1
    else:
        print("boo.. You lose this round!")
        computer_score += 1

print("\nGame Over!")
print(f"Your score: {user_score}")
print(f"Computer's score: {computer_score}")

if user_score > computer_score:
    print("You win the game!")
elif user_score < computer_score:
    print("ayye u lost")
else:
    print("It's a tie!")

Built With

Share this project:

Updates