Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bridge Task #4 - Trivia Challenge Overview: The Trivia Challenge Game tests a player's knowledge with a series of multiple-choice questions. The game delivers the

image text in transcribed

Bridge Task \#4 - Trivia Challenge Overview: The Trivia Challenge Game tests a player's knowledge with a series of multiple-choice questions. The game delivers the questions as a single "episode." The episode created as an example is about The Office and is called, "Must See TV." All of the questions relate in some way to The Office. The cool thing about the game is that the questions for an episode are stored in a separate file, independent of the game code. This way, it's easy to play different ones. Even better, this means that anyone with a text editor can create their own trivia episode about whatever topic they choose -anything from anime to zoology. With the basics of files under your belt, it's time to tackle the Trivia Challenge game. As you'll see in the code, the text file the program reads, trivia.txt, needs to be in the same directory at the program file. To create your own episode full of questions, all you need to do is replace this file with one containing your own work. Complete in Coding Rooms. Understanding the Data File Layout Before we work on the actually game, you should understand exactly how the trivia.txt file is structured. The very first line of the file is the title of the episode. The rest of the file consists of blocks of eight lines for each question. You can have as many blocks (and thus questions) as you like. Take a look at the text file I posted as an example. Here is a generic block:

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

Students also viewed these Databases questions