CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
464
You visited us 464 times! Enjoying our articles? Unlock Full Access!
Question

Write a program to find the grade of a student when grades are allocated as given in the table below. Percentage of the marks obtained by the student is input to the program.
Percentage of Marks Grade
Above 90% A
80% to 90% B
70% to 80% C
60% to 70% D
Below 60% E

Open in App
Solution

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 D

flag
Suggest Corrections
thumbs-up
54
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Relation with Fractions and Decimals
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon