Chris G.

asked • 12/02/21

Python Assignment

The game you will construct here will require user input to appease or defeat the characters above, each of which has a different requirement. To receive full credit for this assignment, your program must:

  1. Include proper commentary
  2. Begin by welcoming the user to the program however you see fit and giving a premise/general overview
  3. Your program should require the user to press “enter” (or really enter ANYTHING) to start the game, at which point you should begin the timer
  4. Once the game starts, your program should run for ten “rounds”. In each round:
  5. Your program should RANDOMLY pick one of the first three characters from the list that will represent the user’s “task” that round (see extra credit for what to do with the fourth character)
  6. Display the character that was chosen on the screen
  7. Display some fun message that, among other things, tells the user what they have to do to progress past the character (see below)
  8. Accept the user’s input, and:
  9. If the correct input was entered, the program should move on to the next round
  10. If incorrect input was entered, the program should immediately terminate with a message telling the user they lost
  11. Each character has a different requirement:
  12. The first character above, Gollum, requires the user to enter any vowel, regardless of capitalization. However, the user may NOT use the same vowel to move past successive Gollum characters, even if they don’t come one immediately after another. So, for example, if the first character generated is Gollum, and he is defeated with A, then the next time Gollum appears, the only options are E, I, O, and U.
  13. The second character, Gandalf, requires the user to enter the phrase YOU SHALL NOT PASS. Capitalization should NOT matter—i.e., everything like you shall not pass, YOU SHALL NOT PASS, and yoU sHALl NoT paSS should work.
  14. The third character, Smaug, requires payment to be defeated. He can be paid with American bill denominations, but must be paid exactly what he asks for. Your program should:
  15. Randomly generate an int from 1 to 1000, inclusive. When Smaug appears, he should tell the user that this number is required as payment.
  16. In order, ask the user how many of each bill they would like to give to Smaug. Bills include $100, $50, $20, $10, $5, and $1.
  17. If, after the last bill amount request, the value of all sent bills exactly-equals the requested amount, Smaug allows the user to pass
  18. If the user successfully completes ten rounds, the program should output a message telling them they have won, and tell the user the amount of time it took to complete the game.


1 Expert Answer

By:

Nathan J. answered • 12/07/21

Tutor
4.9 (54)

Knowledgeable and Patient Algebra Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.