Programming Examples

Python program to read marks of six subjects and to print the 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

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))
▶ RUN

Output/ Explanation:

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

Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad