Support our Blind Hand Charity by donating at 9818291723. Your contribution has the potential to bring about significant positive change for humanity.

Search This Blog

MY PROGRAMMES

Sunday, April 16, 2023

RESULT GRADING THROUGH PERCENTAGE

n=input("Enter your name = ")
a1=input("Enter the name of the first subject = ")
a2=float(input("Enter the marks of first subject = "))
b1=input("Enter the name of the second subject = ")
b2=float(input("Enter the marks of second subject = "))
c1=input("Enter the name of the third subject = ")
c2=float(input("Enter the marks of third subject = "))
d1=input("Enter the name of the fourth subject = ")
d2=float(input("Enter the marks of fourth subject = "))
e1=input("Enter the name of the fifth subject = ")
e2=float(input("Enter the marks of fifth subject = "))
p=(a2+b2+c2+d2+e2)/5
if (p<30 and p>0):
    print("Percentage =",p,"%"."\n""Grade D")
elif (p<60 and p>31):
    print("Percentage =",p,"%"."\n""Grade C")
elif (p<80 and p>61):
    print("Percentage =",p,"%"."\n""Grade B")
elif (p<90 and p>81):
    print("Percentage =",p,"%"."\n""Grade A2")
elif (p<=100 and p>91):
    print("Percentage =",p,"%"."\n""Grade A1")
else:
    print(end="")