Advertisements
Advertisements
प्रश्न
Write a program to find the grade of a student when grades are allocated as given in the table below.
| Percentage of Marks | Grade |
| Above 90% | A |
| 80% to 90% | B |
| 70% to 80% | C |
| 60% to 70% | D |
| Below 60% | E |
The percentage of the marks obtained by the student is input into the program.
टीपा लिहा
Advertisements
उत्तर
Program:
#Program to print the grade of the student
n = float(input('Enter the percentage of the student: '))
if(n > 90):
print("Grade A")
elif(n > 80):
print("Grade B")
elif(n > 70):
print("Grade C")
elif(n >= 60):
print("Grade D")
else:
print("Grade E")
OUTPUT:
Enter the percentage of the number: 60
Grade Dshaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
