No products in the cart.

Write a code to calculate and …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write a code to calculate and display total marks and percentage of a student from a given list sorting the marks of a student .
  • 1 answers

Preeti Dabral 2 years, 11 months ago

n = int(input("Enter the number of subjects: "))

l = list()

for i in range(n):

 x = float(input("Enter the marks: "))

 l.append(x)

print(l, "is the given list of marks.")

print()

tot = int(input("Enter the total marks of the test: "))

ntot = n*tot

ftot = sum(l)

print("Total marks: ", ftot)

print("Percentage: ", (ftot/ntot)*100)

http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App