Computer Science, asked by kumarabhinav9949, 1 month ago

write a program to calculate percentage of marks in 3 subjects in python.Raise exception if marks entered is more than the maximum marks​

Answers

Answered by BrainlyYourBrother
3

Answer:

Hope the picture helps you...

Attachments:
Answered by Himanshu8715
0

#Program to calculate percentage of marks in 3 subjects

total = 0

t = int(input ("Enter total marks (Out of which, marks are obtained) : "))

print ("Enter marks of each subject :---------------")

for i in range (3):

a = int(input("Enter marks of subject : "))

if a > t :

print ("Obtained marks exceeded total marks!")

else :

total += a

p = (total*100)/(3*t)

print ("Percentage obtained = ", p)

Similar questions