Python program to take six subjects marks and calculate total marks obtained and the percentage

 

Python program to take six subjects marks and calculate total marks obtained and the percentage

 ( The exam is out of 600)

s1=int(input("Enter marks of Python subject :"))

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

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

s4=int(input("Enter marks of SAD: "))

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

s6=int(input("input marks of COA: "))

Total_marks=s1+s2+s3+s5+s6

percentage=(100*Total_marks)/600

print("The total marks out of 600 is :",Total_marks)

print("The student has got the percentage is:", round(percentage,2))

 

Output:

Enter marks of Python subject :78

Enter marks of DBMS: 67

Enter marks of PHP: 76

Enter marks of SAD: 56

Enter marks of EVS: 65

input marks of COA: 86

The total marks out of 600 is : 372

The student has got the percentage is: 62.0

The round() in python is used to round the result. With the variable you can pass the value to get number of decimal points.

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

0 टिप्पण्या