Question Description
I’m working on a python question and need support to help me learn.
Write a class named Question on a file Question.py.
Each Question object will contain information about a single trivia question. Its __init__ function should take:
- 5 strings: a question, four possible answers (one of which should be correct)
- An int: the positional number of the correct answer. For example, if the second answer passed to the constructor is thecorrect one, pass 2 for this argument.
The Question class should overload the __str__ method. It should print the question string and the four possible answers. This class should also have a guess method, which takes an integer argument. If integer passed to ‘guess’ matches the ‘answer’ attribute, return True. Otherwise, return False
In your main function on Main.py, create a list of four Question objects. Initialize them with whatever questions and possible answers you want. Two players will be playing this game. In a loop, print the first Question in the list and ask the first player for their guess, then ask the second player for their guess. After both have guessed, inform them of who got the question correct and increment the appropriate scores. Once all the questions have been asked, inform the players of their scores.
Submit both your Question.py and Main.py files.