
Nathan J. answered 12/07/21
Knowledgeable and Patient Algebra Tutor
I am NOT a Python programmer so I can't give you detailed advice on how to specifically implement a solution, but I can help you understand what the program is supposed to do.
Welcome message - this is a terminal application so look up how to write a text message, typically something along the lines of "print"
Press any key - "Enter" is fairly easy as most programming languages end input on the newline character, but pressing any key will require you look up keybindings as you will need to capture ANY event from the keyboard so look for something like "on key press".
Smaug should be fairly easy math. You know the order the bills are offered so take your random amount and subtract the value entered by the user (you will likely have to parse the string to an integer) multiplied by the value of the bill. If the amount owed to Smaug equals zero after subtracting the $1 bills you win.
Use a for loop to implement the 10 rounds. I would use an enumeration data structure to create named constants for GANDALF, SMAUG, and GOLEM and then generate a random number from 1 to 3 (Python is 1 indexed) and then use a switch statement to determine which boss you are fighting that round. Loops and switch statements don't always get along nicely so I would just increment your loop control variable past the end to guarantee things end.
For Gollum, I would definitely use a list data structure since you are editing it randomly. Create a list of vowels in whatever case you want, iterate over the list comparing the user input to each member in the list using a case insensitive compare (or use something like toLower or toUpper to convert it to your preferred case), and remove the list entry on a match or trigger the end condition without a match.
Gandalf is solved similarly to Gollum, except you just need to use a string trim method (to remove extra spaces) followed by a case insensitive compare.
The timing function can be accomplished by getting the time when you first start the program and getting the time at the end and subtracting. Use a Date method to print it in a human readable form.