Skip to content
C

Grade Calculator

Easypython

Take a mark out of 100 and print the letter grade it earns.

Grading scale: A (marks >= 90), B (marks >= 75), C (marks >= 60), D (marks >= 40), Fail (below 40).

Approach: this is a direct if-elif-else chain — check the highest boundary first, and let the first matching condition decide the grade.

Input: One line: marks, a whole number from 0 to 100.

Output: One line: Grade: <letter>

Input (stdin)

Output

Run your code to see output here...