Q. 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

 

 

 

 

 

 

 

 

Percentage of the marks obtained by the student is input to the program.


Answer :- 


per = float( input("Enter a the percentage of student :-"))

if per > 90 :
    print("A")
elif per > 80 :
    print("B")
elif per > 70 :
    print("C")
elif per > 60 :
    print("D")
else :
    print("E")


Output :-

Enter a the percentage of student :-50
E

>>> 

Enter a the percentage of student :-96
A

>>>


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post