(11.) Write Python program that accepts marks in 5 subjects and outputs average marks.
Answers
Answered by
6
Aim: To calculate the average of marks of 5 subjects.
Coding:
eng=int(input("enter english marks:"))
sci=int(input("enter science marks:")
soc=int(input("enter social science marks:"))
lang=int(input("enter language marks:"))
mat=int(input("enter mathematics marks:"))
avg=(eng+sci+soc+lang+mat)/5
print("The average mark is ", avg)
Steps Of Execution:
- Click file menu and choose save option.
- Save the program with the extension .py.
- Press F5 to execute.
Output:
enter english marks: 90
enter science marks: 96
enter social science marks: 88
enter language marks: 93
enter mathematics marks: 98
The average mark is 93
Similar questions
Math,
5 months ago
Biology,
5 months ago
Social Sciences,
9 months ago
Science,
1 year ago
Math,
1 year ago