Python Program to check student is pass or fail in Examination

Python Program to check student is pass or fail in Examination


 s1=int(input("Enter marks of C Language:"))

s2=int(input("Enter marks of DBMS Language:"))

s3=int(input("Enter marks of Python Language:"))

s4=int(input("Enter marks of Java Language:"))

s5=int(input("Enter marks of PHP:"))

total=s1+s2+s3+s4+s5

print(f"The total obtained marks are {total}")

percentage=(100*total)/500

print(f"The percentage is {percentage}%")

if percentage >=40:

    print(f"The student has got {percentage}% and he/she is pass in examination ")

else:

    print(f"The student has got {percentage}% and he/she fail in examination")

Output:

Enter marks of C Language:78

Enter marks of DBMS Language:88

Enter marks of Python Language:89

Enter marks of Java Language:89

Enter marks of PHP:89

The total obtained marks are 433

The percentage is 86.6%

The student has got 86.6% and he/she is pass in examination 


टिप्पणी पोस्ट करा

0 टिप्पण्या