Loading...
Loading...
Loading...
A school converts marks into a grade. Marks of 90 or more get A, 75 or more get B, 60 or more get C, 40 or more get D, and anything lower gets F.
Given the marks, print the grade.
A, B, C, D or F.Example 1
Input
82
Output
B
Example 2
Input
35
Output
F
Try the problem first. Open one hint at a time.
Check the highest band first and move down. Each elif only runs when the lines above failed.
You do not need marks < 90 in the second check. When the program reaches it, the first check has already failed.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor