Wednesday, February 27, 2019

Average of Marks - Python3

l1=[]
for i in range(0,5) :
    l1.append(int(input("Enter the "+str(i+1)+" subject Marks : ")))
avg=sum(l1)/5
if avg<=100 and avg>=90:
        print("You have achieved A+ grade!!!!")
        print("Congratulations!!!!")
elif avg<=89 and avg>=80: 
        print("You have achieved A grade!!!!!")
elif avg<=79 and avg>=60:
        print("You have achieved B+ grade!!!!!")
elif avg<=59 and avg>=50:
        print("You have achieved B grade!!!!!!!")
elif avg<=49 and avg>=40:
        print("You have achieved C grade!!!!!!") 
elif avg<=39 and avg>=0:
        print("You have achieved F grade!!!!!")
else:
        print("Enter Marks Properly")

ScreenShot:


No comments:

Post a Comment