File size: 585 Bytes
6736fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from config.cfg import Quiz
import os
import pandas as pd
import json
from pathlib import Path

class Option(Quiz):

    def __init__(self, question_file, datafile):
        super().__init__(question_file, datafile)

    def get_option(self, level):
        return [k for k in self.option_data[level]]

    def get_next_level(self, user_choice, level):
        print(self.option_data[level][user_choice]["next"])
        return self.option_data[level][user_choice]["next"]

    def get_feedback(self, user_choice, level):
        return self.option_data[level][user_choice]["feedback"]