Spaces:
Runtime error
Runtime error
mertbozkurt
commited on
Commit
·
ab3f8d4
1
Parent(s):
5784728
Update functions.py
Browse files- 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]
|
117 |
myIndex.append(-1)
|
118 |
|
119 |
else :
|
|
|
106 |
|
107 |
for x in range (0,num_questions):
|
108 |
arr = myPixelVal[x]
|
109 |
+
t =150
|
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]>t and arr[2]>t) or ( arr[1]>t and arr[3]>t) or (arr[1]>t and arr[4]>t) or (arr[1]>t and arr[5]> t) or (arr[2]>t and arr[3]> t) or (arr[2]>t and arr[4]> t) or (arr[2]>t and arr[5]> t) or (arr[3]>t and arr[4]> t) or (arr[3]>t and arr[5]> t) or (arr[4]>t and arr[5]>t) :
|
117 |
myIndex.append(-1)
|
118 |
|
119 |
else :
|