Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Discover detailed solutions to your questions from a wide network of experts on our comprehensive Q&A platform. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform.

Based on three scores that the user inputs, display the average of the score and the letter grade that is assigned fort he test score average. The grading scheme is as follows:
// 90 - 100 A
// 80 - 89 B
// 70 - 79 C
// 60 - 69 D
// <60 F
return 'F';
Your display should look like:
Your average test score is 89.9. You earned a B.
1 public void calculateDisplayLetterGrade (double scorel, double score2, double score3)
2 {
3
4 }
5

Sagot :

I used python function to write the code.

def averageScore(x,y,z):

    s = x + y + z

    avg = s/3

   if avg >= 90:

              return f'Your average test score is {avg} You earned a A.'

    elif avg >=80 and avg < 90 :

                return f'Your average test score is {avg} You earned a B.'

   elif avg >=70 and avg < 80 :

                 return f'Your average test score is {avg} You earned a .C'

      elif avg >=60 and avg < 70 :

                  return f'Your average test score is {avg} You earned a D.'

      else:

                    return f'Your average test score is {avg} You earned a F.'

print(averageScore(98, 90, 80))

Python function is used to write the code where x, y and z are the argument (user inputs) of the function. Then the inputs are summed and the average is gotten and stored with the variable, avg.  

If the average is greater than or equal to 90 the program will give the appropriate score and response(grade). It does the same if the user scored 80 - 89, 70 - 79, 60 - 69 and less than 60.

Finally. the function is called with the user input(argument).

Note the bolded values in the code are keywords in python.

read more: https://brainly.com/question/14191443?referrer=searchResults

View image vintechnology