Question: I need to be able to have three inputs for years. Then I need it to come out with and average. # Error found in

I need to be able to have three inputs for years. Then I need it to come out with and average.

# Error found in this function:

#

def getGrade():

grade = input("Enter your test score: ")

return grade

# Error found in this function:

#

def all_As(test1, test2, test3):

if 89 < test1 and 89 < test2 and 89 < test3:

print("Wow! ", end="")

print("You scored all As on your exams!")

print("Nice job!")

# Error found in this function:

#

def calc_average(test1, test2, test3):

return ((test1 + test2 + test3) // 3)

# Error found in this function:

#

def letter_grade(grade):

if grade >= 90:

print("You earned an A")

if grade >= 80:

print("You earned an B")

if grade >= 70:

print("You earned an C")

if grade >= 60:

print("You earned an D")

if grade < 60:

print("You earned an F")

# THERE ARE NO ERRORS IN THE MAIN

#-----main-----

print("Enter 3 test scores:")

first_test = getGrade()

second_test = getGrade()

third_test = getGrade()

print()

all_As(first_test,second_test,third_test)

average = calc_average(first_test, second_test, third_test)

print("Your test average is",average)

letter_grade(average)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!