0% found this document useful (0 votes)
139 views

Python Code in Computing Student Grades With Remarks

Python code for computing student grades with remarks based on Philippine Education Grading System. This is a basic Python Programming Code which could help Python bigenners in their journey as a junior programmer.

Uploaded by

johnjohn291998
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

Python Code in Computing Student Grades With Remarks

Python code for computing student grades with remarks based on Philippine Education Grading System. This is a basic Python Programming Code which could help Python bigenners in their journey as a junior programmer.

Uploaded by

johnjohn291998
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#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}!")

You might also like