Hello again, I am working on another homework problem for my fundamentals class and my brain just isn't working. Like always I am looking for direction not for someone to do the work for me. So I have to create a program that asks for 5 test scores and will print out the grade (A, B, C, D, or F) for each score and then the average test score. The only instruction I have to follow is creating 2 functions (calc_average and determine_grade). I believe I have it where you can enter the 5 test scores and have the first function (calc_average) done. I am having an issue with how to determine the grade for each test score.
Here is what I have
def main():
test1 = int(input('What is the score of test number 1? ')
test2 = int(input('What is the score of test number 2? ')
test3 = int(input('What is the score of test number 3? ')
test4 = int(input('What is the score of test number 4? ')
test5 = int(input('What is the score of test number 5? ')
average = calc_average(first, second, third, forth, fifth)
print('The average score is ', average, '.', sep='')
def calc_average(first, second, third, forth, fifth):
average_grade = (first, second, third, forth, fifth)/5
return average_grade
def determine_grade(first, second, third, forth, fifth):
main()
So I am not sure how to do the 2nd function (determine_grade). I was thinking a loop that will test each score for the grade condition (A being 90-100, B being 80-89, C being 70-79, D being 60-69 and F being anything below 60. If that is right I am not thinking correctly on how to get each test score to run through that process. In the chapter that we are in we learned about the Math module but not sure if that will be helpful in anyway.
Thanks again for any guidance.