subject
Computers and Technology, 11.06.2020 18:57 Deascry

There are two parts to the programming assignment. 1. Design and create a Question class according to the class specifications below. The Question class will hold data for a trivia question.
2. Write a script (on a separate file) that simulates a simple trivia game for two players.
Specification for Question class: A Question object has a question or prompt and four possible answers, but only one of the answers is correct – so basically, we are simulating a multiple-choice question.
Attributes
A trivia question or prompt
Possible answer 1
Possible answer 2
Possible answer 3.
Possible answer 4
The number of the correct answer (either 1, 2, 3, or 4)
Note: you could also label the possible answers with letters (e. g.: a, b, c, and d). Then the correct answer would be a value such as a, b, c, or d.
Methods
__init__ method
Getter methods (accessors/inspectors)
Setter methods (mutators)
A method that returns a string with the prompt and the possible answers. This method will be used in a script to display the trivia questions to the players. Make sure to format the string accordingly.
Script
Your program will simulate a simple trivia game for two players who will take turns in answering questions. Each time a player gives the correct answer to a question, the player earns a point. After all the questions have been answered, the program should display the number of points earned by each player and who the winner is, or indicate that there is a tie if that is the case.
Use the Question class to create at least 10 trivia questions on the topic of your choice. The Question objects you create must be stored in a list. If you need inspiration to create trivia questions, you may want to take a look at this site that has fan quizzes for many subjects (books, movies, TV shows, sports, etc.):
NOTE: Please keep in mind that you are expected to write a good quality, well formatted program. That means: • User input must be validated and your program gracefully handle invalid inputs. • Repetitive code (code that appears in multiple places in the main script) should be written as a function. • Your program must use good style, including proper identifier names, useful comments, and proper use of indentation and whitespace. • You program should also have an appropriate user interface so that anyone one using the program knows what to do and what to expect.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:30
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
question
Computers and Technology, 24.06.2019 15:40
In the above figure, what type of cylinder arrangement is shown in the figure above? a. l-type b. v-type c. in-line d. horizontal pls make sure its right if its rong im grounded for 3months
Answers: 1
You know the right answer?
There are two parts to the programming assignment. 1. Design and create a Question class according...
Questions
question
Mathematics, 16.10.2020 07:01
question
Biology, 16.10.2020 07:01
question
Mathematics, 16.10.2020 07:01
question
Computers and Technology, 16.10.2020 07:01