mertbozkurt commited on
Commit
15e67c0
·
1 Parent(s): c7ca61b

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +2 -2
functions.py CHANGED
@@ -106,14 +106,14 @@ def user_answers(num_questions,myPixelVal):
106
 
107
  for x in range (0,num_questions):
108
  arr = myPixelVal[x]
109
-
110
  #empty answers
111
  if arr[1] < 150.0 and arr[2] < 150.0 and arr[3] < 150.0 and arr[4] < 150.0 and arr[5] < 150.0:
112
 
113
  myIndex.append(0)
114
 
115
  #2 or more answers
116
- elif arr[1]+arr[2]>350 or arr[1]+arr[3]>350 or arr[1]+arr[4]>350 or arr[1]+arr[5]>350 or arr[2]+arr[3]>350 or arr[2]+arr[4]>350 or arr[2]+arr[5]>350 or arr[3]+arr[4]>350 or arr[3]+arr[5]>350 or arr[4]+arr[5]>350:
117
  myIndex.append(-1)
118
 
119
  else :
 
106
 
107
  for x in range (0,num_questions):
108
  arr = myPixelVal[x]
109
+ thresh =375
110
  #empty answers
111
  if arr[1] < 150.0 and arr[2] < 150.0 and arr[3] < 150.0 and arr[4] < 150.0 and arr[5] < 150.0:
112
 
113
  myIndex.append(0)
114
 
115
  #2 or more answers
116
+ elif arr[1]+arr[2]>thresh or arr[1]+arr[3]>thresh or arr[1]+arr[4]>thresh or arr[1]+arr[5]> thresh or arr[2]+arr[3] thresh or arr[2]+arr[4]> thresh or arr[2]+arr[5]> thresh or arr[3]+arr[4]> thresh or arr[3]+arr[5]> thresh or arr[4]+arr[5]>thresh:
117
  myIndex.append(-1)
118
 
119
  else :