= ")) marks.append(m) for j in range(len(marks)): print("{ }. { } Mark = { } ".format(j+ ,subjects[j],marks[j])) print("Total Marks = ", sum(marks)) Output Enter Mark = Enter Mark = Enter Mark = Enter Mark = Enter Mark = Enter Mark = . Tamil Mark = . English Mark = .
Physics Mark = . Chemistry Mark = . Comp. Science Mark = .
Maths Mark = Total Marks = Program : Python program to read marks of six subjects and to print the marks scored in each subject and show the total marks items=[] prod= for i in range( ): print ("Enter price for item { } : ".format(i+ )) p=int(input()) items.append(p) for j in range(len(items)): print("Price for item { } = Rs. { }".format(j+ ,items[j])) prod = prod * items[j] print("Sum of all prices = Rs.", sum(items)) print("Product of all prices = Rs.", prod) print("Average of all prices = Rs.",sum(items)/len(items)) Program : Python program to read prices of items in a list and then display sum of all the prices, product of all the prices and find the average 12th Computer Chapter - - Output: Enter price for item : Enter price for item : Enter price for item : Enter price for item : Enter price for item : Price for item = Rs. Price for item = Rs. Price for item = Rs.
Price for item = Rs. Price for item = Rs. Sum of all prices = Rs. Product of all prices = Rs.
375000 Average of all prices = Rs. . count= n=int(input("Enter no. of employees: ")) print("No.
of Employees",n) salary=[] for i in range(n): print("Enter Monthly Salary of Employee { } Rs.: ".format(i+ )) s=int(input()) salary.append(s) for j in range(len(salary)): = salary[j] * print ("Annual Salary of Employee { } is:Rs. { }".format(j+ , )) if >= 100000: count = count + print("{ } Employees out of {