-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvalue_count.py
34 lines (17 loc) · 949 Bytes
/
value_count.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def value_count(angry, disgust, fear, happy, sad, surprise, neutral):
li = [len(angry), len(disgust), len(fear),
len(happy), len(sad), len(surprise), len(neutral)]
confidence_high = li[3] + li[-1] // sum(li)
confidence_low = li[2] + li [4] // sum(li)
if confidence_high > 75:
print("Good confidence and Grade {}".format("Strong A++"))
return "Good confidence and Grade {}".format("Strong A++")
elif confidence_high < 74 or confidence_high >= 65:
print("Better confidence and Grade {}".format("Strong A+"))
return "Better confidence and Grade {}".format("Strong A+")
elif confidence_high > 54 or confidence_high < 64:
print("its okay and Grade {}".format("weak B"))
return "its okay and Grade {}".format("weak B")
else:
print("Need to improve and Grade {}".format("Failed"))
return "Need to improve and Grade {}".format("Failed")