Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We want to program an Orges, Robbers, and Witches game. You are a commander of an army of Orges, Robbers and Witches. At each turn,

We want to program an Orges, Robbers, and Witches game. You are a commander of an army of Orges, Robbers and Witches. At each turn, you can choose one of these three to put into battle. The two chosen combatants will fight each other to determine the winner. If the user enters an invalid input, then ask again. In general,

Witches can cast death spells on Orges.

Robbers kill Witches.

Orges eat Robbers.

Start with a nice ASCII art intro again (the ones used here are from the internet). At each turn, your program should randomly choose Orges, Robbers, or Witches (Hint: use the random module). It should also ask the user to choose one of the three. The program should then determine whether the computer wins, the user wins, or there is a tie.

Finally, the program should ask the user whether they want to keep playing. If the user answers Y or y, a new game should start. At each turn, the program will prompt the user to enter one of the three to go into battle. During the execution of the program, keep a counter of wins and losses by each side. You must report the final stats and a winner when the user quits.

Please see below for a sample run.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

69 Needs assessment and analysis.

Answered: 1 week ago

Question

What is management growth? What are its factors

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago