Question: Write a Python program that satisfies the following output: Welcome to Blue v Red 1 . Play Game | 2 . Show Stats | 3

Write a Python program that satisfies the following output:
Welcome to Blue v Red
1. Play Game |2. Show Stats |3. Quit
Enter your choice: Why?
Invalid choice.
1. Play Game |2. Show Stats |3. Quit
Enter your choice: 1
Enter the number of players in each team: 0
Invalid input. Please enter a number between 1 and 10.
Enter the number of players in each team: 100
Invalid input. Please enter a number between 1 and 10.
Enter the number of players in each team: 3
Enter name for player 1:
You can't have an empty player name.
Enter name for player 1: why not?
Enter name for player 2: Oh, I see now that's my name :)
Enter name for player 3:
You can't have an empty player name.
Enter name for player 3: Champion
Blue Team: why not? Oh, I see now that's my name :) Champion Red Team: Alice the Adventurer Kiera the Knight Ingenious Ingrid Who will compete for your team?
1. why not?
2. Oh, I see now that's my name :)
3. Champion
Choose your player number (1-3): 4
Invalid input. Please enter a number between 1 and 3.
Choose your player number (1-3): 3
Red chose Alice the Adventurer
Alice the Adventurer (Red) wins :(
Blue Team: why not? Oh, I see now that's my name :)
Red Team: Alice the Adventurer Kiera the Knight Ingenious Ingrid Who will compete for your team?
1. why not?
2. Oh, I see now that's my name :)
Choose your player number (1-2): 1
Red chose Ingenious Ingrid
Ingenious Ingrid (Red) wins :(
Blue Team: Oh, I see now that's my name :)
Red Team: Alice the Adventurer Kiera the Knight Ingenious Ingrid Who will compete for your team?
1. Oh, I see now that's my name :)
Choose your player number (1-1): 1
Red chose Alice the Adventurer
Alice the Adventurer (Red) wins :(
Blue Team:
Red Team: Alice the Adventurer Kiera the Knight Ingenious Ingrid Red wins the game :(
1. Play Game |2. Show Stats |3. Quit Enter your choice: 1
Enter the number of players in each team: 2
Enter name for player 1: This name is really long, so I hope I win Enter name for player 2: Steve
Blue Team: This name is really long, so I hope I win Steve
Red Team: Kiera the Knight Great Gadfly
Who will compete for your team?
1. This name is really long, so I hope I win
2. Steve
Choose your player number (1-2): 1
Red chose Kiera the Knight
This name is really long, so I hope I win (Blue) wins!
Blue Team: This name is really long, so I hope I win Steve Red Team: Great Gadfly
Who will compete for your team?
1. This name is really long, so I hope I win
2. Steve
Choose your player number (1-2): 1
Red chose Great Gadfly
This name is really long, so I hope I win (Blue) wins!
Blue Team: This name is really long, so I hope I win Steve Red Team:
Blue wins the game :)
1. Play Game |2. Show Stats |3. Quit Enter your choice: 2
Wins: 1
Losses: 1
Win %: 50.0
1. Play Game |2. Show Stats |3. Quit
Enter your choice: 1
Enter the number of players in each team: 1
Enter name for player 1: All for one and One for all! Blue Team: All for one and One for all!
Red Team: Dave
Who will compete for your team?
1. All for one and One for all!
Choose your player number (1-1): 0
Invalid input. Please enter a number between 1 and 1. Choose your player number (1-1): 1
Red chose Dave
All for one and One for all! (Blue) wins!
Blue Team: All for one and One for all! Red Team:
Blue wins the game :)
1. Play Game |2. Show Stats |3. Quit Enter your choice: 2
Wins: 2
Losses: 1
Win %: 66.7
1. Play Game |2. Show Stats |3. Quit Enter your choice: 3
Farewell champion!
And here is a third run where the user just selected quit as the first menu choice.
Welcome to Blue v Red
1. Play Game |2. Show Stats |3. Quit Enter your choice: 2
Wins: 0
Losses: 0
Win %: 0.0
1. Play Game |2. Show Stats |3. Quit Enter your choice: 3
Goodbye and better luck next time.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!