So, I decided to go back to school to update some of my skill-sets and got stuck in Python Programming. Ive done ok so far, but now I'm stuck.
Here is the problem I'm stuck on:
Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following functions in the program:
calc_average-- This function should accept five test scores as an arguments and return the average of the scores.
determine_grade-- This function should accept a test score as an argument and return a letter grade for the score, based on the following grading scale:
90-100 A
80-89 B
70-79 C
60-69 D
below 60 F
I get the asking for the user input, thats easy.
That would be along the lines of this:
num1 = input('Please enter your first test score: ')
num2 = input('Please enter your second test score: ')
num3 = input('Please enter your third test score: ')
num4 = input('Please enter your fourth test score: ')
num5 = input('Please enter your fifth test score: ')
# Run the calc_average and determine_grade functions
average = calc_average(num1, num2, num3, num4, num5)
The calc_average is easy too:
def calc_average(num1, num2, num3, num4, num5):
average_score = (num1 + num2 + num3 + num4 + num5) / 5
return average_score
Its the next part that messes me up. Im not sure how to have the determine_grade function work in this setup. Any help would be appreciated.