63. Python Program to Calculate a Grade from Marks
Mediumelse and elif
Overview
An elif chain where the order of the conditions matters.
Problem Statement
Read marks (a whole number from 0 to 100) and print the grade: 90 or more is A, 75 or more is B, 60 or more is C, 40 or more is D, anything lower is F. For example, for 82:
Grade: B
Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.
Input
One value per line, in this order. Example:
82
Output
The output for that example:
Grade: B
The tests try 4 different inputs.