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