Can Anyone Please Answer This
Class 11
Computer Science
[Related To Python]
Write A Program To Input Marks Secured In Five Subjects Calculate Total And Average Marks Display Output With All Details
Please Don't Give Unnecessary
Answer, If You Know Then Only Give, Don't Cheat, By Pasting Some answer
I Will Complain
Please answer, by solving on your own, or by typing by your own
please try to follow the pattern in attached pictures
Attachments:
Answers
Answered by
0
Logic to find total, average and percentage
- Input marks of five subjects. ...
- Calculate sum of all subjects and store in total = eng + phy + chem + math + comp .
- Divide sum of all subjects by total number of subject to find average i.e. average = total / 5 .
- Calculate percentage using percentage = (total / 500) * 100 .
Answered by
2
Answer:
This is the required Python program for the question.
n=input("Enter your name: ")
print("Enter your marks in 5 subjects.")
s=av=0.0
for i in range(5):
s+=float(input(">> "))
av=s/5
print("Name:",n)
print("Marks Obtained:",s)
print("Average:",av)
Algorithm:
- Accept the name.
- Accept the marks in 5 different subjects.
- Add up all the marks.
- Calculate average by dividing the total marks by 5.
- Display the name, total marks secured and average.
Refer to the attachment for output.
•••♪l
Attachments:
Similar questions