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
Predict how digital video will be viewed in the future. Step into the year 2028. How are people viewing digital video? Or have w
frutty [35]
<span>Google Glass was interesting; a personal screen overlaid onto the real world, with 'augmented reality' ideas. The Nintendo 3DS was the first 'no glasses' portable 3D system.

So I predict Google 3D Glasses with built in Dolby 9.1 sound emulation. </span>
6 0
3 years ago
Read 2 more answers
What is a way of telling the computer how to display certain content pls answer quick
coldgirl [10]
Machine language is the language understood by a computer. It is very difficult to understand, but it is the only thing that the computer can work with. All programs and programming languages eventually generate or run programs in machine language
4 0
3 years ago
Specification of database requirements falls under which category of database​ administration?
enot [183]
Specification of database requirements falls under which category of database​ administration?

b. development
3 0
3 years ago
Two electronics technicians are discussing electrical quantities. Technician A says that resistance is an opposition to electric
inessss [21]
Neither are correct.

Resistance is opposition to CURRENT not power.
Technition B Is wrong about the voltage thingy.
6 0
3 years ago
What does expected initializer before ". " token mean?
densk [106]

;l p lm k                  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn

4 0
3 years ago
Other questions:
  • To add and remove chart elements, you can use the add chart element button in the charts layout group on the ____ tab.
    6·1 answer
  • Do you think engineers have to adapt their original plans during the construction of systems or products? Why might they?
    6·1 answer
  • What type of hard drive is in original xbox?
    6·1 answer
  • 30
    5·1 answer
  • The expression 10,785(1.0275)x represents the amount of money in an investment account with interest that compounds annually for
    14·2 answers
  • Help what is a computer made from (computer class question)!!
    9·1 answer
  • A brown outline around a frame is an indication of which tool?​
    13·1 answer
  • you are working on creating a business document with two other co-workers. Based on just information, which of the following pre
    14·1 answer
  • RTOS stands for ______ Time Operating System.
    11·1 answer
  • Which letter shows the ball when it has the maximum kinetic energy
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!