marks scored in each subject and show the total marks

"> PYTHON PROGRAM TO READ MARKS OF SIX SUBJECTS AND TO PRINT THE MARKS SCORED IN EACH SUBJECT AND SHOW THE TOTAL MARKS

Programming Example

Python program to read marks of six subjects and to print the marks scored in each subject and show the total marks

Solution

marks=[]
subjects=['Tamil', 'English', 'Physics', 'Chemistry', 'Comp. Science', 'Maths']
for i in range(6):
	m=int(input("Enter Mark = "))
	marks.append(m)
for j in range(len(marks)):
	print("{ }. { } Mark = { } ".format(j1+,subjects[j],marks[j]))
print("Total Marks = ", sum(marks))
Output

Enter Mark = 45

Enter Mark = 98

Enter Mark = 76

Enter Mark = 28

Enter Mark = 46

Enter Mark = 15


1. Tamil Mark = 45

2. English Mark = 98

3. Physics Mark = 76

4. Chemistry Mark = 28

5. Comp. Science Mark = 46

6. Maths Mark = 15

Total Marks = 308

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad