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
lianna [129]
3 years ago
5

Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output th

e list. (2 pts)
Ex:

Enter weight 1:
236.0
Enter weight 2:
89.5
Enter weight 3:
176.0
Enter weight 4:
166.3
Weights: [236.0, 89.5, 176.0, 166.3]
(2) Output the average of the list's elements with two digits after the decimal point. Hint: Use a conversion specifier to output with a certain number of digits after the decimal point. (1 pt)

(3) Output the max list element with two digits after the decimal point. (1 pt)
Computers and Technology
1 answer:
Lesechka [4]3 years ago
6 0

Answer:

# FIXME (1): Prompt for four weights. Add all weights to a list. Output list.

weight_one=float(input('Enter weight 1:\n'))

weight_two=float(input('Enter weight 2:\n'))

weight_three=float(input('Enter weight 3:\n'))

weight_four=float(input('Enter weight 4:\n'))

weights=[weight_one,weight_two,weight_three,weight_four]

print(weights)

# FIXME (2): Output average of weights.

average_weight=(weight_one + weight_two + weight_three + weight_four) / 4

print('Average weight:', "%.2f" % average_weight)

# FIXME (3): Output max weight from list.

weights.sort()

max_weight= weights[3]

print('Max weight:', "%.2f" % max_weight)

# FIXME (4): Prompt the user for a list index and output that weight in pounds and kilograms.

print(input('Enter a list index location (0 - 3):'))

print('Weight in pounds:', weights)

kilograms = float(weights) * 2.2

print('Weight in kilograms:')

# FIXME (5): Sort the list and output it.

weights.sort()

print(weights)

Explanation:

You might be interested in
which computer career field enables you to create and design interactive multimedia products and services
dusya [7]
I think its graphic design 
4 0
3 years ago
The dns server translates the URL into the IP address 8.8.8.8. What is the next step in the process?
geniusboy [140]

Answer:

The web browser sends an HTTP request to the IP address, the IP address then sends the content that are displayed by the browser

Explanation:

The process of converting the typed in URL to a displayed page is as follows;

1) The typed in URL is sent to a DNS recursor by the browser

2) The recursor gets the DNS record for the domain from the cache if the record is cached or when the DNS record for the domain is not cached, the recursor makes a requests to the DNS root from which the name of the TLD nameserver is received

3) The TLD nameserver is contacted by the resolver to obtain the authoritative nameserver's IP address

4) With the information, the resolver contacts the authoritative nameserver and obtains the domain's IP address for the domain the resolver contacts

5) The obtained IP address for the URL's domain is then sent to the browser by the resolver

6) An HTTP request is sent by the browser to the IP address and the data received by the browser from that IP address is rendered and seen as the page content.

6 0
2 years ago
True / False<br> General purpose registers can be read and written by ML programs
Oduvanchick [21]

Answer: False

Explanation:

  General purpose register cannot be read and written by the Ml program because when ever the instruction decode the input and output unit are invoke for data to read in the memory and it can written to the output device from the memory. General purpose register stored both the addresses and the data in the file. In some cases ML only reads with the hep of special algorithm function.

6 0
2 years ago
Who is mostly affected by computer viruses?
Komok [63]
People who use Windows OS.
3 0
3 years ago
A laptop computer is smaller than desktop computer. True or false
alina1380 [7]

Answer:

true

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Privileged instructions 1) generate an interrupt so they can execute before non-privileged instructions. 2) are valid only when
    5·1 answer
  • What is the difference between First Person Shooters and Construction Simulations?
    12·2 answers
  • Obtain the 10’s complement of the following six-digit decimal numbers:<br><br> 123900<br><br> 980657
    10·1 answer
  • _____ rows indicate that there is different formatting for odd and even rows.
    14·1 answer
  • With network management software, a network manager can ____.
    6·1 answer
  • What is the function of a breadcrumb trail website
    7·1 answer
  • How many 1000-Watt lights can be plugged into a standard 120-Volt, 15-Amp outlet? (Hint: W/V=A) *
    7·1 answer
  • Microsoft vs Sony who wins ​
    13·2 answers
  • TRUE OR FALSE: THE BUILDER'S CLUB IS A PAID SUBSCRIPTION.
    9·2 answers
  • Please help……Your friend is taking images from all over the internet without giving credit to the sources. He tells you that it’
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!