Grade Calculator

Lab Python Beginner 10 points

Read a score from 0 to 100 and print the grade: 90+ A, 80+ B, 70+ C, 60+ D, otherwise F.

Input

One integer.

Output

One letter.

Example

Input

95

Output

A
Sample input available Sample output available
Editor
Python

Hints

Check the highest band first so each elif only needs a lower bound.

Solution explanation

Ordering the conditions from high to low avoids writing ranges like 80 <= s < 90.

Show solution
score = int(input())
if score >= 90:
    print("A")
elif score >= 80:
    print("B")
elif score >= 70:
    print("C")
elif score >= 60:
    print("D")
else:
    print("F")
Output
Answer
HOME LEARN COMMUNITY DASHBOARD