Python Program to Find Student Grade in Examination Using if-elif-else Statement
s1=int(input("Enter Python marks:"))
s2=int(input("Enter PHP marks:"))
s3=int(input("Enter DBMS marks:"))
s4=int(input("Enter COA marks:"))
s5=int(input("Enter C programming marks:"))
total_marks=s1+s2+s3+s4+s5
p=(100*total_marks)/500
if p>=70:
print("You have got distinction")
elif p>=60:
print("You have got first class")
elif p>=50:
print("You have got second class")
elif p>=40:
print("You are just pass")
else:
print("You are fail in examination")
Output:
Enter Python marks:90
Enter PHP marks:78
Enter DBMS marks:34
Enter COA marks:56
Enter C programming marks:67
You have got first clas/s
0 टिप्पण्या
कृपया तुमच्या प्रियजनांना लेख शेअर करा आणि तुमचा अभिप्राय जरूर नोंदवा. 🙏 🙏