Question
# Error found in this function: # def getGrade(): grade = input(Enter your test score: ) return grade # Error found in this function: def
# 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!")
def calc_average(test1, test2, test3):
return (test1 + test2 + test3) / 3
def letter_grade(grade):
if grade >= 90:
print("You earned an A")
elif grade >= 80:
print("You earned an B")
elif grade >= 70:
print("You earned an C")
elif grade >= 60:
print("You earned an D")
elif grade < 60:
print("You earned an F")
print("Enter 3 test scores:")
first_test = int(getGrade())
second_test = int(getGrade())
third_test = int(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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started