To find grade for five subjects using python
maths=int(input("enter marks"))
pysics=int(input("enter marks"))
soicial=int(input("enter marks"))
science=int(input("enter marks"))
english=int(input("enter marks"))
total=maths+pysics+soicial+english+science
print(total)
percentage=(total/500)*100
print(percentage)
if percentage > 90:
print("grade A")
if percentage > 80 and percentage<90:
print("grade B")
if percentage >70 and percentage<80:
print("grade C")
if percentage <60 :
print("Fail")
Comments
Post a Comment