Q. Write the python program that accept marks in 5 subjects and output average marks.
You can understand by Watching video :-
Answer :-
a = int(input("enter the marks of first subject = ")) b = int(input("enter the marks of second subject = ")) c = int(input("enter the marks of third subject = ")) d = int(input("enter the marks of fourth subject = ")) e = int(input("enter the marks of fifth subject = ")) average =( a+b+c+d+e )/5 print("average of total marks = ",average)
Output :-
enter the marks of first subject = 96
enter the marks of second subject = 98
enter the marks of third subject = 90
enter the marks of fourth subject = 91
enter the marks of fifth subject = 85
average of total marks = 92.0
>>>
enter the marks of first subject = 70
enter the marks of second subject = 68
enter the marks of third subject = 45
enter the marks of fourth subject = 81
enter the marks of fifth subject = 67
average of total marks = 66.2
>>>
Welcome : )
ReplyDeletethanksss !!!
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )