Grade From Marks
Programs with input · Beginner · about 5 min
Read a student's marks, a whole number from 0 to 100. Print the grade as Grade: B, using these bands:
- 90 to 100: A
- 75 to 89: B
- 60 to 74: C
- 40 to 59: D
- below 40: E
The prompts inside input() are not checked, only what you print.
Example
You type:
82The program prints:
Grade: B
marks = int(input("Marks out of 100: "))
# Work out the grade and print it
The solution opens after your first Check.