Trivia game | Computer Science homework help

    

Description 

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. 

  • 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.
     
Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Ethics
Writer did do a good job in answering my question and assignment!
Customer 454777, July 8th, 2020
Other
Short and precise as I wanted. Thank you!
Customer 462359, October 14th, 2022
Computer science
I proofread the filled template. It was very helpful to understand what mistakes I had done in my first-week assignment. I learned about the topics.
Customer 462947, May 7th, 2022
Healthcare & Medical
Good work
Customer 463469, October 22nd, 2022
Other
Good work on the spreadsheet.
Customer 459155, May 31st, 2022
Education
Always use AP Style for your headings https://capitalizemytitle.com/style/AP/
Customer 452441, April 11th, 2022
MGMT 221 Introduction to Management Information System
Great job!
Customer 457731, February 25th, 2022
Communications
The best writer. Thank you!
Customer 462787, August 1st, 2022
Retail
Thank you for your work. Some sentences required minimal edits for clarification/explanation. In the future, please review your sentences for clarity and readability. Consider also reading out loud before submitting. We look forward to future contributions.
Customer 463469, October 21st, 2022
Law
Good work.
Customer 462759, June 15th, 2022
GOVT 200
Plagiarism issue noted.
Customer 454799, July 11th, 2022
Communications
best writer and customer service. Thanks Tony!
Customer 462787, August 30th, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat