Dannyar608 commited on
Commit
bc2e94d
·
verified ·
1 Parent(s): ed8a781

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -62,18 +62,13 @@ learning_style_answers = [
62
  ["Remember faces", "Remember names or voices", "Remember what you wrote about them"]
63
  ]
64
 
65
- style_count_map = {
66
- 0: 'visual',
67
- 1: 'auditory',
68
- 2: 'reading/writing'
69
- }
70
-
71
  def learning_style_quiz(*answers):
72
  scores = {'visual': 0, 'auditory': 0, 'reading/writing': 0}
73
  for i, ans in enumerate(answers):
74
  if i < len(learning_style_answers):
75
  options = learning_style_answers[i]
76
  if ans in options:
 
77
  index = options.index(ans)
78
  style = style_count_map[index]
79
  scores[style] += 1
 
62
  ["Remember faces", "Remember names or voices", "Remember what you wrote about them"]
63
  ]
64
 
 
 
 
 
 
 
65
  def learning_style_quiz(*answers):
66
  scores = {'visual': 0, 'auditory': 0, 'reading/writing': 0}
67
  for i, ans in enumerate(answers):
68
  if i < len(learning_style_answers):
69
  options = learning_style_answers[i]
70
  if ans in options:
71
+ # Correctly map the index to the style
72
  index = options.index(ans)
73
  style = style_count_map[index]
74
  scores[style] += 1