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
PostgreSQLv16

Itt jelenik meg a kód futtatásának eredménye

Visible tests
1
Input
95, 90, 93
Expected"A"
2
Input
85, 80, 90
Expected"B"
3
Input
70, 70, 70
Expected"C"
4
Input
60, 62, 60
Expected"D"
5
Input
30, 40, 50
Expected"F"
6
Input
30, 2, 50
Expected"F"
Focus radio
Paused · SomaFM · Fluid