#AVERAGE GRADE WITH REMARKS
#1. Accept grades from 8 school subjects
#2. Display the average of the grades.
#3. Put a remarks based on the grading
#system below:
#100% = Highest Honor
#99% to 98% = High Honor
#97% to 95% = With High Honor
#94% to 90% = With Honor
#89% to 75% = Passed
#74% to 70% = Conditional
#69% and below = Failed
#Hanedle also the user input of grades. Grades should only be numbers and not a
letter or with letters.
print("ENTER THE GRADE OF EACH SUBJECT\n\n")
subjects = ["English", "Filipino", "History", "Science", "Mathematics", "MAPEH",
"ESP", "T.L.E"]
grades = []
for subject in subjects:
while True:
try:
grade = float(input(f"{subject} = "))
grades.append(grade)
break
except ValueError:
print("Invalid input. Please enter a numeric value.")
average_grade = sum(grades) / len(grades)
if average_grade == 100:
remarks = "Highest Honor"
elif 98 <= average_grade <= 99:
remarks = "High Honor"
elif 95 <= average_grade < 98:
remarks = "With High Honor"
elif 90 <= average_grade < 95:
remarks = "With Honor"
elif 75 <= average_grade < 90:
remarks = "Passed"
elif 70 <= average_grade < 75:
remarks = "Conditional"
else:
remarks = "Failed"
print(f"\n\nGeneral Weighted Average: {average_grade}%\nRemarks: {remarks}!")