1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Fynjy0 [20]
2 years ago
5

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
Computers and Technology
1 answer:
Korolek [52]2 years ago
5 0

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: brainly.com/question/14191443?referrer=searchResults

You might be interested in
Harold wants to create a design that would depict the innocent and evil sides of human nature. Which colors can Harold use to de
belka [17]

Answer:

Usually good and evil are depicted as black and white or red and white. White being good, or pure.

Explanation:

8 0
2 years ago
Xbrl taxonomy: is the document format used to produce web pages. is the final product (report. is a classification scheme. is a
frosja888 [35]
The answer to this is "is a classification scheme"..hope that helped
3 0
3 years ago
Name the tools in plant propagation.<br>Q<br>18.<br>16.<br>17.<br>19.<br>20.<br>please po asap​
Agata [3.3K]
16. Branch or tree cutter
17.paint tape
18. Knife
19. Pots
20. Waterer
6 0
2 years ago
1:A presentation program which is developed by Microsoft
LekaFEV [45]
Option 3: PowerPoint.
4 0
2 years ago
Read 2 more answers
What is a computer meaning
goldenfox [79]

Answer:

computer means an electronic machine which process raw data and gives meaningful information to the user

7 0
2 years ago
Other questions:
  • The OSHA Workplace Poster 3165 is optional for workplaces.<br> A) True<br> B) False
    13·2 answers
  • You use a ____ following the closing brace of an array initialization list.
    12·2 answers
  • Enter the value of 5⋅(13.5−4.5). <br> ​
    5·1 answer
  • Im being timed please help!!
    7·2 answers
  • True or False? Most operating systems allow the user to specify a set of paths that are searched in a specific order to help res
    5·1 answer
  • What are the features of Cobol language that make it suitable for programming business applications.
    6·1 answer
  • Visual culture is an area of academic study that deals with the totality of images and visual objects produced in ____________,
    6·1 answer
  • Anybody wanna be friends?
    10·2 answers
  • Consider the following code: def tryIt(b): for i in range(len(b)): b[i] = b[i] + 100 #***********MAIN************ x = [] x = [56
    8·1 answer
  • ⚠VERY IMPORTANT MESSAGE⚠
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!