diff --git a/question_answer_output.py b/question_answer_output.py deleted file mode 100644 index 4c861af..0000000 --- a/question_answer_output.py +++ /dev/null @@ -1,24 +0,0 @@ -import json -from random import randrange - - -# Einlesen vom Json File -def read_json(filename): - with open(filename,encoding='utf-8') as filename: - data = json.load(filename) - return data - - -# Zufällige Frage erstellen -def random_question(filename): - min_ = 0 - max_ = len(read_json(filename)) - random_number = randrange(min_,max_) - questions = read_json(filename) - question = f'Frage #{random_number}: ' + questions[random_number][str(random_number)]['question'] - answer = questions[random_number][str(random_number)]['answer'] - return question, answer - - -#print(random_question(config.json_file)[0]) -