A quiz app has three kinds of question. Each level adds one thing to the level above it.
Question(text, answer)
check(guess) returns True if the guess matches the answer, ignoring capital letters and spaces at either end. So " paris " matches "Paris".TimedQuestion(text, answer, seconds), a child of Question
seconds, the time limit. Let the parent set up text and answer.points(guess, taken) returns:
taken is at most seconds,BonusQuestion(text, answer, seconds, bonus), a child of TimedQuestion
bonus defaults to 5. Let the parent set up everything else.points(guess, taken) returns the parent's points, plus bonus only when the parent's points are 10.