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
A graph of an organization'snet income over the past 10 years is an example of an analogmodel.
oksano4ka [1.4K]

Answer:

True

Explanation:

<u>Analog model</u>

It is a representation of target model,it include charts,models of electric and mechanical system and graphs also.The size of this model is not fixed it may vary according to the requirements,so it may be small or big.

As per question,the graph is representing net income of an organization, it also representing a model(target) for the company that's why we can call it an Analog model.

6 0
3 years ago
Study and compare the tables and draw conclusions.
SSSSS [86.1K]
Need the tables for an answer
5 0
3 years ago
Which cell formatting is most likely to use $?
otez555 [7]
The correct answer is A. currency.
4 0
2 years ago
How can i appear offline without fb messenger saying "last active 1 minute ago"?
Furkat [3]
Go to settings and hit privacy to change who can see your posts
5 0
3 years ago
Expresa tu reflexión sobre la necesidad de un código de etica para la IA (inteligencia artificial) , oponia sobre los bots en la
JulsSmile [24]

Answer:

Ethics in artificial intelligence and robotics are of greater importance today as machine learning or robots are put to use to benefit humans and also ti harm humans.

Explanation:

Ethics in robotics or artificial intelligence in sometimes referred to as "roboethics". It is very necessary in todays time because robots are made to interact with the society, the humans.

This is the key concern for ethics which is based on growing awareness of the requirement to regulate, the  advancements in the field of AI in the near future. The future law or regulations should be on the basis of some of the shared values such as privacy, freedom, security, respect for human dignity, non - military, inclusions, etc. Here, the uncertainty is also being recognized, the uncertainty to know the advancements of AI in the near future. Therefore the regulations and ethical dilemmas should be rethought in the middle.

4 0
3 years ago
Other questions:
  • In Paint, which of the following are ways to use a picture that you have saved on your computer? (Select all that apply.)
    8·1 answer
  • Plz help! 3 questions! 1.The ideal light to use is.... A.front light B.a combination of side and back light C.a combination of f
    10·1 answer
  • What does the rule of five say?
    12·2 answers
  • The idea behind ____ is that the peripheral can simply be plugged in and turned on, and that the computer should dynamically rec
    10·1 answer
  • TCP is the protocol responsible for the delivery of data on the Internet, and IP provides addresses and routing information.
    12·1 answer
  • Which of the following methods for learning to use new software includes tips for using the product, updates to download, and in
    7·2 answers
  • Select the correct word to complete the sentence
    11·2 answers
  • Taking a group of recipes and identifying the similarities is an example of _____.
    13·1 answer
  • Please help with coding assignment.
    11·1 answer
  • You are setting up a home network for your friend. She has students visiting her home regularly for lessons and wants to provide
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!