student details

an anonymous user · January 15, 2022 · Python
print("Enter the name:")
name=input()
mark1=int(input("Enter the marek1:"))
mark2=int(input("Enter the marek2:"))
mark3=int(input("Enter the marek3:"))
mark4=int(input("Enter the marek4:"))
mark5=int(input("Enter the marek5:"))
total=mark1+mark2+mark3+mark4+mark5
print("Total Mark:",total)
average=total/5 
print("Average:",average)
a=int(average)
if(a>=90 and a<=100):
  print("O Grade")
elif(a>=80 and a<89): 
  print("A grade")
elif(a>=70 and a<79):  
  print("B grade")
elif(a>=60 and a<69):
     print("C grade")
elif(a>=50 and a<59):
    print("D grade")
else:
    print("Fail")

Comments

Please sign up or log in to contribute to the discussion.