Computer Science, asked by chotukr0556, 9 months ago


(11.) Write Python program that accepts marks in 5 subjects and outputs average marks.

Answers

Answered by Positive31
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:

  1. Click file menu and choose save option.
  2. Save the program with the extension .py.
  3. 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