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
Mars2501 [29]
3 years ago
7

(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the arr

ay's numbers on one line, each number followed by one space. (2 pts) Ex: Enter weight 1: 236.0 Enter weight 2: 89.5 Enter weight 3: 142.0 Enter weight 4: 166.3 Enter weight 5: 93.0 You entered: 236.0 89.5 142.0 166.3 93.0 (2) Also output the total weight, by summing the array's elements. (1 pt) (3) Also output the average of the array's elements. (1 pt) (4) Also output the max array element. (2 pts) Ex: Enter weight 1: 236.0 Enter weight 2: 89.5 Enter weight 3: 142.0 Enter weight 4: 166.3 Enter weight 5: 93.0 You entered: 236.0 89.5 142.0 166.3 93.0 Total weight: 726.8 Average weight: 145.35999999999999 Max weight: 236.0
Computers and Technology
1 answer:
Mashutka [201]3 years ago
6 0

Answer:

weights = []

total = 0

max = 0

for i in range(5):

   weight = float(input("Enter weight " + str(i+1) + ": "))

   weights.append(weight)

   total += weights[i]

   if weights[i] > max:

       max = weights[i]

average = total / 5

print("Your entered: " + str(weights))

print("Total weight: " + str(total))

print("Average weight: " + str(average))

print("Max weight: " + str(max))

Explanation:

Initialize the variables

Create a for loop that iterates 5 times

Get the values from the user

Put them inside the array

Calculate the total by adding each value to the total

Calculate the max value by comparing each value

When the loop is done, find the average - divide the total by 5

Print the results

You might be interested in
Prove that: P = hdg​
Alchen [17]

Answer:

here u go your answer

Explanation:

.............

7 0
3 years ago
Read 2 more answers
Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In 1–2 sentences, descri
Tresset [83]

Carlos Should use a Security Camera to keep track of his physical hardware. Carlos can then use a computer to monitor the security cameras.

7 0
4 years ago
Read 2 more answers
Which statements are true? Select 4 options.
kolezko [41]

Answer: All of the answers are correct EXCEPT "An instance of a class cannot be changed after it is created.

Explanation: I've done the problem. Also, if you have an instance of a class, you can no longer change it. It is frozen in time as that one instance. If had a class defining pets and you made an instance dogA where the pet was a brown medium sized dog, dogA would always be a brown medium sized dog. I think, at least.

4 0
3 years ago
Which of the following is not a type of Internet Job Board? Options Resume Blaster Professional Association Target Applicants We
mr Goodwill [35]
The answer is : Weighted application blanks

Job board is a type of system in which the employers set up a list of requirements for the job hunter

Weighted Application blanks is used to to collect background information from the job applicants, which is not a part of job board
6 0
3 years ago
Your eighty-three-year-old grandmother has been using a computer for some time now. As a way to keep in touch, you frequently se
Sergeu [11.5K]

Answer:

Cultural lag

Explanation:

Cultural lag is a situation where by a society experiences technological development at a rate faster than the development that occurs in culture and general way of life.

A very good example is that it takes a longtime before cultural development can match up with technological developments and advancements thus leading to social problems due to lag. The cultural lag theory was formed in 1922 by William F Ogburn a sociologist.

3 0
3 years ago
Other questions:
  • When you buy a trackphone, do you have to pay a monthly wage or do you just need to buy the minutes and that's all?
    13·2 answers
  • What is micro blogging?
    13·1 answer
  • Gn to be printed at a commercial printer. Which main ink type's exact color appearance is determined by the printer and requires
    13·1 answer
  • Why does hamlet want to kill himself and what stops him from doing that?
    10·1 answer
  • If a secret key is to be used as a _________ for conventional encryption a single number must be generated.
    13·1 answer
  • Describe IT infrastructure. What is the role of business intelligence in determining the technology needs of a business?
    11·1 answer
  • As an ICT student teacher using convincing and cogent reasons explain why you think operating system is pivotal in teaching and
    7·1 answer
  • Open IDLE. Create a new script file (File-->New File, Ctrl n on Windows, Cmd n on macOS). On the first line, place your name
    6·1 answer
  • You have a passage of text that needs to be typed out, but some of the letter keys on your keyboard are broken! You're given an
    14·1 answer
  • All of the following are personal security safeguards except ________. Select one: A. send no valuable data via email B. Use htt
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!