write a Python program to read marks in 6 subject and calculate total and percentage
Answers
MarkA = int(input("enter mark of 1st subject"))
MarkB = int(input("enter mark of 2nd subject"))
MarkC = int(input("enter mark of 3rd subject"))
MarkD = int(input("enter mark of 4th subject"))
MarkE = int(input("enter mark of 5th subject"))
MarkF = int(input("enter mark of 6th subject"))
total = MarkA + MarkB + MarkC + MarkD + MarkE + MarkF
print("The total mark is ", total)
percent = total / 6
print("Total percentage = ", percent, "%")
#Mark this answer as brainliest if this helps you
The following codes must be typed in script mode, saved and then executed.
CODE:
sub1 = float(input("Enter the marks of subject 1:"))
sub2 = float(input("Enter the marks of subject 2:"))
sub3 = float(input("Enter the marks of subject 3:"))
sub4 = float(input("Enter the marks of subject 4:"))
sub5 = float(input("Enter the marks of subject 5:"))
sub6 = float(input("Enter the marks of subject 6:"))
total = sub1 + sub2 + sub3 + sub4 + sub5 + sub6
avg = total/6
print("The total percentage is", avg, "%")
OUTPUT:
24
14
21
22
24
22