simple python program to calculate total marks

Solutions on MaxInterview for simple python program to calculate total marks by the best coders in the world

showing results for - "simple python program to calculate total marks"
Butch
30 May 2018
1print("Enter marks of five subjects:")
2S1=float(input())
3S2=float(input())
4S3=float(input())
5S4=float(input())
6S5=float(input())
7
8#Calculate total, average and percentage one by one
9total = S1 + S2 + S3 + S4 + S5
10average = total/5.0
11percentage = (total / 500.0) * 100
12
13#Print the result
14print("Total marks =", total)
15print("Average marks =", average)
16print("Percentage = ", percentage)