'F' → Fullscreen
Create a new Python program named 1-15-rock-paper-scissors.
import random
wins = 0losses = 0round_num = 1playing = Trueplayer = ""computer = ""
# Rules:# Rock smashes Scissors# Paper covers Rock# Scissors cuts Paper
print("--- Rock, Paper, Scissors ---")import random
wins = 0losses = 0round_num = 1playing = Trueplayer = ""computer = ""
# Rules:# Rock smashes Scissors# Paper covers Rock# Scissors cuts Paper
print("--- Rock, Paper, Scissors ---")
while playing: print(f"Round {round_num}") print(f"W: {wins} - L: {losses}")
player = input("(rock, paper, scissors):").lower()
random_num = random.randint(0, 2)
if random_num == 0: computer = "rock" elif random_num == 1: computer = "paper" else: computer = "scissors"
print(f"Computer chooses {computer}!")import random
wins = 0losses = 0round_num = 1playing = Trueplayer = ""computer = ""
# Rules:# Rock smashes Scissors# Paper covers Rock# Scissors cuts Paper
print("--- Rock, Paper, Scissors ---")
while playing: print(f"Round {round_num}") print(f"W: {wins} - L: {losses}")
player = input("(rock, paper, scissors):").lower()
random_num = random.randint(0, 2)
if random_num == 0: computer = "rock" elif random_num == 1: computer = "paper" else: computer = "scissors"
print(f"Computer chooses {computer}!")
if player == computer: print("-TIE-") elif ( (player == "rock" and computer == "scissors") or (player == "paper" and computer == "rock") or (player == "scissors" and computer == "paper") ): print("-YOU WIN-") wins = wins + 1 else: print("-YOU LOSE-") losses = losses + 1
round_num = round_num + 1
play_again = input("Play again? (y/n):").lower() playing = play_again == "y"import random
wins = 0losses = 0round_num = 1playing = Trueplayer = ""computer = ""
# Rules:# Rock smashes Scissors# Paper covers Rock# Scissors cuts Paper
print("--- Rock, Paper, Scissors ---")
while playing: print(f"Round {round_num}") print(f"W: {wins} - L: {losses}")
player = input("(rock, paper, scissors):").lower()
random_num = random.randint(0, 2)
if random_num == 0: computer = "rock" elif random_num == 1: computer = "paper" else: computer = "scissors"
print(f"Computer chooses {computer}!")
if player == computer: print("-TIE-") elif ( (player == "rock" and computer == "scissors") or (player == "paper" and computer == "rock") or (player == "scissors" and computer == "paper") ): print("-YOU WIN-") wins = wins + 1 else: print("-YOU LOSE-") losses = losses + 1
round_num = round_num + 1
play_again = input("Play again? (y/n):").lower() playing = play_again == "y"
print("--- Final Score ---")print(f"Wins: {wins} - Losses: {losses}")print("Thanks for playing!")Verify your program works correctly.
--- Rock, Paper, Scissors ---Round 1W: 0 - L: 0(rock, paper, scissors): rock [Enter]Computer chooses scissors!-YOU WIN-Play again? (y/n): y [Enter]Round 2W: 1 - L: 0(rock, paper, scissors): paper [Enter]Computer chooses paper!-TIE-Play again? (y/n): y [Enter]Round 3W: 1 - L: 0(rock, paper, scissors): scissors [Enter]Computer chooses rock!-YOU LOSE-Play again? (y/n): n [Enter]--- Final Score ---Wins: 1 - Losses: 1Thanks for playing!Answer the following questions before submitting your work.
round_num use that name instead of just round?playing = play_again == "y" turn a typed answer into a boolean?and pairs joined by or, instead of one simple comparison?Submit the required files to the appropriate dropbox.