Python Program to write Student MarksList Logic using ‘if’ statement.
How does this program work?
- This code helps to how to write Student MarksList program using ‘if’ statement.
Here is the code
e = int (input("Enter English Marks: "))
h = int (input("Enter Hindi Marks: "))
m = int (input ("Enter Maths Marks: "))
sc = int (input("Enter Science Marks: "))
so = int (input("Enter Social Marks: "))
tot = t+e+h+m+sc+so
avg = tot/6
print("Total:",tot)
print ("Average:",avg)
if (t<35) or (e<35) or (h<35) or (m<35) or (sc<35) or (so<35):
print("Fail")
elif (avg>=35) and (avg<50):
print("IIIrd class")
elif (avg>=50) and (avg<60):
print("IInd class")
elif (avg>=60) and ( avg<75):
print("Ist class")
else:
print("Distinction")