Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I am having a really diffiult time with this. So please explain it step by step as you would for a 6 year old.

Hello, I am having a really diffiult time with this. So please explain it step by step as you would for a 6 year old. I want to know what to save first, and how to import. I dont just want to simply copy, I want to understand and learn it. So PLEASE, step by step. I want you to teach this to first time student being introduced to coding. Thank You.

build this game. All of the work you have done to this point will cover all of the requirements of this game, but you will have to take it a step at a time to put it all together. For this assignment, this game is a TEXT-based game. However, it should still present well for the user to understand that they are answering a new question or that they are in the menu of category choices. Here is an example of what this could look like, with user input in bold:

image text in transcribed

Additionally, the structure of your program should allow it to be used as a module. While this sounds daunting, it really means following these four rules:

  1. All functionality that runs this application (loading the category content, running the game, displaying results, etc.) should all be isolated in functions using parameters and return values to handle the functionality.
  2. No data will be kept in the global scope. That is, no variables will be defined indented to the far left.
  3. Using a main() function to run the application will provide the "glue" that pulls together these features into a complete game.
  4. The call to the main function needs to be guarded to prevent it from being called automatically when referenced through an import statement. This is a new concept being introduced here, but just follow the syntax:
if __name__ == "__main__": main()H To add some variety to the game, provide a random phrase function for successful and unsuccessful results of the question. These can be funny but MUST be clean and not offensive. An example of an unsuccessful response: "Really? Did you read the question?" or "Um, yeah.. no!" These should be selected at random and there should be enough phrases to get through a 10-question category. Please enter one of the following selections: ['Movies', 'History', 'Art', 'Quit'] Movies There are 2 questions in this round. What's the name of the skyscraper in Die Hard? a) Nakatomi Plaza c) Eifel Tower b) Trump Tower d) World Trade Center Choice ['a', 'b', 'c', 'd']: a Correct! What flavor of Pop Tarts does Buddy the Elf use in his spaghetti in 'Elf'? a) Brown Sugar c) Chocolate b) Cherry d) Blueberry Choice [' a ', ' b ', 'c', 'd']: d Sorry. The correct answer was c) Chocolate Your score was 10/20 ! You may want to read more and put down the phone. Please enter one of the following selections: ['Movies', 'History', 'Art', 'Quit'] Art There are 1 questions in this round. Which famous painter was also a sculptor, an architect, and an engineer? a) Andy Warhol c) Rembrant b) Leonardo Da Vinci d) Elon Musk Choice [' a ', ' b ', 'c', 'd']: d Sorry. The correct answer was b) Leonardo Da Vinci Your score was /10 ! You may want to read more and put down the phone. Please enter one of the following selections: ['Movies', 'History', 'Art', 'Quit'] Quit

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions