Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Quiz:
- _questions = {
- "A question?": [
- "An option",
- "Another option",
- "A third option",
- "The fourth option",
- "b", # This indicates that "Another option" is correct.
- # It says you could also copy "Another option" in here
- ],
- "Another question?": [
- ]
- }
- #Constructor / Initializer
- def __init__(self, value: int) -> None:
- self._score = value #Score
- self._correctTotal = value #Total Correct
- self._incorrectTotal = value #Total Incorrect
- # Accessor for the private attributes: score, correct, incorrect
- def getScore(self) -> int:
- return self._score
- def getCorrect(self) -> int:
- return self._correctTotal
- def getIncorrect(self) -> int:
- return self._incorrectTotal
- def checkAnswer(question, answer) -> bool:
- return
- score = Quiz(0)
- correctTotal = Quiz(0)
- incorrectTotal = Quiz(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement