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
Which of the following Office Online apps is most effective for creating spreadsheets?
navik [9.2K]
The answer is C Excel. Excel allows you to make spreadsheets.

Hope this helps :-)
4 0
3 years ago
Read 2 more answers
Allan is manager of the software. His team has compiled various design documents prior to starting the development of the softwa
Hunter-Best [27]

Answer:

i think the answer is B

Explanation:

idk

7 0
3 years ago
Which form of Internet communication would a consumer seek out if they wanted to get personal perspectives into a company and it
bija089 [108]
The answer you are looking for is probably the "Internet Forum".

Internet Forum or known for some as the message board is a discussion held online typically in websites. Internet users are posting messages on a website. Some are posting their personal perspectives on a specific company or products.

The answer could also be "Reviews". Usually in a website like online shopping, they have this review sections for the users to post their review for the products.
3 0
3 years ago
PYTHON:
tankabanditka [31]

Answer:

figure of merit is a quantity used to characterize the performance of a device, system or method, relative to its alternatives. In engineering, figures of merit are often defined for particular materials or devices in order to determine their relative utility for an application.

3 0
3 years ago
How many bits must be “flipped” (i.e., changed from 0 to 1 or from 1 to 0) in order to capitalize a lowercase ‘a’ that’s represe
Neporo4naja [7]

<span>To capitalize lowercase “a” which is 0110001 which is “A” you will need to flip the following bites 01000001<span> as represented in ASCII. Since we are only looking at 2bit digit which is 0 and 1 which  has a 256 possible combinations from 0 up to 255. </span></span>


6 0
3 years ago
Other questions:
  • Which of the following statements BEST describe why Agile is winning?
    14·2 answers
  • When choosing a new computer to buy, you need to be aware of what operating it uses.
    12·1 answer
  • Name the contributions of Steve Jobs and Bill Gates, with respect to technology.
    5·1 answer
  • Spreadsheet allow three types of cell addressing. They include ______addresses, such as $E$1, ______addresses, such as R$3, and
    12·1 answer
  • Preciso de ajuda urgente, é para amanhã cedo!!
    10·1 answer
  • Modify the statistics program from this chapter so that client programshave more flexibility in computing the mean and/ or stand
    8·1 answer
  • Help me. thank you very much
    14·1 answer
  • How did these social media platforms affect or change the way you communicate with other people?
    10·1 answer
  • Explain two protocols to enhance cellular networks capacity?
    8·1 answer
  • Which organization provides a free, online html5 validator application to ensure that a webpage's html tags follow the rules for
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!