Q. Write a program to input marks in 3 subjects; compute average and then calculate grade as per following guidelines:
Grade Remarks Marks
A (Level 4, above agency-normalized standards) 80% and above
B (Level 3, at agency-normalized standards) 70-79%
C (Level 2, below, but approaching agency-normalized standards) 60-69%
D (Level 1, well below agency-normalized standards) 50-59%
E (Level 1-, too below agency-normalized standards) 40-49%
R (Remedial standards) 39% and below
Website Link :-
https://www.pathwalla.com/2020/09/wri...
Answer =
mark1 = int (input ("Enter the mark for subject 1 :- "))
mark2 = int (input ("Enter the mark for subject 2 :- "))
mark3 = int (input ("Enter the mark for subject 3 :- "))
print ("Average marks is :- ", (mark1 + mark2 + mark3) / 3 )
per = ((mark1 + mark2 + mark3) / 300) * 100
print("Percentage :-",per)
if per = 80 :
print ("Grade is 'A'")
elif per = 70 and per = 79 :
print ("Grade is 'B'")
elif per = 60 and per = 69 :
print ("Grade is 'C'")
elif per = 50 and per = 59 :
print ("Grade is 'D'")
elif per = 40 and per = 49 :
print ("Grade is 'E'")
elif per = 39 :
print ("Grade is 'R'")
Output :-
Enter the mark for subject 1 :- 93
Enter the mark for subject 2 :- 96
Enter the mark for subject 3 :- 85
Average marks is :- 91.33333333333333
Percentage :- 91.33333333333333
Grade is 'A'