Grade Book
This is a simple way to turn three numeric scores into a clear letter grade, like in a school grade book or learning platform. Write a function get_grade that takes s1, s2, and s3, calculates their average rounded down, and returns the matching letter. Use these ranges: A for 90–100, B for 80–89, C for 70–79, D for 60–69, and F for anything lower.
Примеры
Ввод
95, 90, 93Вывод
"A"Ввод
85, 80, 90Вывод
"B"Ввод
70, 70, 70Вывод
"C"Нужно реализовать
def get_grade(s1: int, s2: int, s3: int) -> str:
Теги
mathstrings
Logi sisse, et näha esituste ajalugu
Logi sisseLogi sisse, et kasutada AI mentorit
Logi sisseVisible tests
1
Input
95, 90, 93Expected
"A"2
Input
85, 80, 90Expected
"B"3
Input
70, 70, 70Expected
"C"4
Input
60, 62, 60Expected
"D"5
Input
30, 40, 50Expected
"F"6
Input
30, 2, 50Expected
"F"Focus radio
Paused · SomaFM · Fluid