Test Average and Grade 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 methods in the program: • calcAverage—This method should accept five test scores as arguments and return the average of the scores. • determineGrade—This method should accept a test score as an argument and return a letter grade for the score, based on the following grading scale: Score Letter Grade

90-100 A
80-89 B
70-79 C
60-69 D
Below 60 F

d y jdth r

Here's a step-by-step code solution for the program you described:

Step 1: Define the main function.

```python
def main():
# Step 2: Create an empty list to store the test scores.
scores = []

# Step 3: Loop to get the five test scores from the user.
for i in range(5):
score = float(input("Enter test score " + str(i+1) + ": "))
scores.append(score)

# Step 4: Calculate the average test score using the calcAverage method.
average = calcAverage(scores)

# Step 5: Display the letter grade and average test score for each score.
for score in scores:
grade = determineGrade(score)
print("Test score:", score, "Grade:", grade)

print("Average test score:", average)

# Step 6: Define the calcAverage method.
def calcAverage(scores):
total = sum(scores)
average = total / len(scores)
return average

# Step 7: Define the determineGrade method.
def determineGrade(score):
if score >= 90:
return 'A'
elif score >= 80:
return 'B'
elif score >= 70:
return 'C'
elif score >= 60:
return 'D'
else:
return 'F'

# Step 8: Call the main function to run the program.
main()
```

That's it! This program will ask the user to input five test scores, calculate the average test score, determine the letter grade for each score, and display them to the user.

To write a program that asks the user to enter five test scores and displays a letter grade for each score and the average test score, you can follow these steps:

1. Define a function called `calcAverage` that accepts five test scores as arguments. Inside the function, calculate the sum of the scores and divide it by 5 to get the average. Return the average.

2. Define a function called `determineGrade` that accepts a test score as an argument. Inside the function, use conditional statements to determine the appropriate letter grade based on the score. Return the letter grade.

3. In the program's main body, prompt the user to enter five test scores. Store these scores in a list or an array.

4. Call the `calcAverage` function and pass the list of test scores as an argument. Assign the returned value to a variable that holds the average test score.

5. Use a loop to iterate through the list of test scores. For each score, call the `determineGrade` function and pass the score as an argument. Print the score and its corresponding letter grade.

6. Print the average test score.

Here's a Python implementation of the program:

```python
def calcAverage(scores):
total = sum(scores)
average = total / len(scores)
return average

def determineGrade(score):
if score >= 90:
return 'A'
elif score >= 80:
return 'B'
elif score >= 70:
return 'C'
elif score >= 60:
return 'D'
else:
return 'F'

def main():
scores = []
for i in range(5):
score = int(input("Enter test score: "))
scores.append(score)

average_score = calcAverage(scores)

print()
for score in scores:
grade = determineGrade(score)
print("Score:", score, "Grade:", grade)

print("Average Test Score:", average_score)

main()
```

With this program, you can enter five test scores, and it will display the letter grade for each score along with the average test score.