write a python program that accepts a quiz average, midterm grade, and final grade. Compute
the numerical grade , nm= ( quiz average + midterm grade + final grade)/3 and converts it to an equivalent letter
grade, and displays the letter grade. Use appropriate message for the program
midterm = float(input("Enter your midterm average: "))
quiz = float(input("Enter your quiz grade: "))
final = float(input("Enter your final grade: "))
def calculate(midterm, quiz, final):
score = ( quiz + midterm + final)/3
if score >= 90: return "A"
elif score >= 80: return "B"
elif score >= 70: return "C"
elif score >= 60: return "D"
else : return "E"
calculate(midterm, quiz, final)
Comments
Leave a comment