write a program to calculate the sum of marks of 5 subjects.{PYTHON}
Answers
Answered by
2
Answer:
grades = []
print("Enter marks of all 5 subjects ")
tot = 0
for i in range(5):
x = int(input())
grades.append(x)
for i in range(len(grades)):
tot = tot + grades[i]
print("The total in 5 subjects is" , tot)
Explanation:
Answered by
2
write the variables and there values one below the other in the script mode
s=1
d=2
z=3
g=8
h=9
Don't use blank space in variable name.You can write the subject name in place of variable.
T = s+d+z+g+h
print ("sum of the nos, T")
Output
sum of the nos =, 23
Instead of sum of the nos you can write total marks or anything.
Pls mark brainly and folow me.
Similar questions