theodotus commited on
Commit
00271ad
1 Parent(s): 0e96afe

Mandatory test

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -15,11 +15,12 @@ test = Test()
15
 
16
 
17
  def question_interface(question_state, answer):
18
- question_state["value"] += 1
19
- current_question_index = question_state["value"]
20
-
21
- if (current_question_index != 0):
22
  question_state["responses"].append(answer)
 
23
 
24
  # Check if all questions have been answered
25
  if current_question_index == len(test):
 
15
 
16
 
17
  def question_interface(question_state, answer):
18
+ if (question_state["value"] == -1):
19
+ question_state["value"] += 1
20
+ elif (answer is not None):
21
+ question_state["value"] += 1
22
  question_state["responses"].append(answer)
23
+ current_question_index = question_state["value"]
24
 
25
  # Check if all questions have been answered
26
  if current_question_index == len(test):