-
Notifications
You must be signed in to change notification settings - Fork 0
/
grading.py
51 lines (45 loc) · 1.05 KB
/
grading.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
gradePercent = list(map(int, input().split()))
studentPercent = int(input())
A = gradePercent[0]
B = gradePercent[1]
C = gradePercent[2]
D = gradePercent[3]
E = gradePercent[4]
if studentPercent < E:
grade = "F"
else:
if studentPercent < D:
grade = "E"
else:
if studentPercent < C:
grade = "D"
else:
if studentPercent < B:
grade = "C"
else:
if studentPercent < A:
grade = "B"
else:
grade = "A"
print(grade)
# Alternative method, not kattis friendly
"""
A,B,C,D,E, studentPercent = list(map(int, input().split()))
if studentPercent < E:
grade = "F"
else:
if studentPercent < D:
grade = "E"
else:
if studentPercent < C:
grade = "D"
else:
if studentPercent < B:
grade = "C"
else:
if studentPercent < A:
grade = "B"
else:
grade = "A"
print(grade)
"""