Question:
How can I add a loop to my code? I am very confused on which kind of loop to add and how to embed it in my code. PLease help.
import random
print("Thank You for choosing to play Rock, Paper, Scissors UPGRADED. Welcome to Asteroid, Super Blanket, Sword! Choose your move!")
Player_score=0
Computer_score=0
user = input("Asteroid, Super Blanket, or Sword?")
computer = random.choice(["Asteroid","Super Blanket", "Sword"])
if user == computer:
print("You and the AI tied!")
elif user == "Super Blanket":
if computer == "Sword":
print("AI chose the Sword, The Sword cuts the Super Blanket, You Lose!")
Computer_score= +1
else:
print("AI chose the Asteroid, The Super Blanket wraps up the Asteroid, You Win!")
Player_score = +1
elif user == "Sword":
if computer == "Asteroid":
print("AI chose the Asteroid, The Asteroid crushes the Sword, You Lose!")
Computer_score= +1
else:
print("AI chose the Super Blanket, The Sword cuts the Super Blanket, You Win!")
Player_score = +1
elif user == "Asteroid":
if computer == "Super Blanket":
print("AI chose the Super Blanket, The Super Blanket wraps up the Asteroid, You Lose!")
Computer_score= +1
else:
print("AI chose the Sword, The Asteroid crushes the Sword, You Win!")
Player_score = +1
Player_score
Computer_score
num_games = 1
for i in range(num_games):
print("Your score:", Player_score)
print("Computer score:", Computer_score)