-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_Grades.py
executable file
·79 lines (54 loc) · 1.19 KB
/
run_Grades.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python3
# pylint: disable = invalid-name
# pylint: disable = missing-docstring
# pylint: disable = pointless-string-statement
# -------------
# run_Grades.py
# -------------
# -------
# imports
# -------
import Grades
# -----------
# grades_read
# -----------
def grades_read() -> list[list[int]]:
# read newline
input()
# read scores
l_l_scores: list[list[int]] = [[int(s) for s in input().split()] for _ in range(5)]
return l_l_scores
# ------------
# grades_print
# ------------
def grades_print(letter_grade: str) -> None:
print(letter_grade)
# ----
# main
# ----
def main() -> None:
# read number of test cases
input()
# read, eval, print (REPL)
try:
while True:
l_l_scores: list[list[int]] = grades_read()
letter: str = Grades.grades_eval(l_l_scores)
grades_print(letter)
except EOFError:
pass
if __name__ == "__main__": # pragma: no cover
main()
"""
sample input
1
2 2 2 2 0
2 1 1 2 2 2 2 2 2 3 3 0
1 2 2 2 2 2 2 2 2 2 2 2 0 3
2 2 2 1 2 2 2 2 2 3 2 3 0 0
2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 3 2 2 3 2 3 2 2 2 0 0 0 0 0 0 0 0
"""
"""
sample output
B-
"""