Advertisement
Guest User

Untitled

a guest
Dec 17th, 2021
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. class Quiz:
  2.  
  3. _questions = {
  4. "A question?": [
  5. "An option",
  6. "Another option",
  7. "A third option",
  8. "The fourth option",
  9. "b", # This indicates that "Another option" is correct.
  10. # It says you could also copy "Another option" in here
  11. ],
  12. "Another question?": [
  13. ]
  14. }
  15. #Constructor / Initializer
  16. def __init__(self, value: int) -> None:
  17. self._score = value #Score
  18. self._correctTotal = value #Total Correct
  19. self._incorrectTotal = value #Total Incorrect
  20.  
  21. # Accessor for the private attributes: score, correct, incorrect
  22. def getScore(self) -> int:
  23. return self._score
  24.  
  25. def getCorrect(self) -> int:
  26. return self._correctTotal
  27.  
  28. def getIncorrect(self) -> int:
  29. return self._incorrectTotal
  30.  
  31. def checkAnswer(question, answer) -> bool:
  32. return
  33.  
  34. score = Quiz(0)
  35. correctTotal = Quiz(0)
  36. incorrectTotal = Quiz(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement