Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output the 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] 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) Output the max list element with two digits after the decimal point. (1 pt) 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] Average weight: 166.95 Max weight: 236.00 Prompt the user for a number between 1 and 4. Output the weight at the user specified location and the corresponding value in kilograms. 1 kilogram is equal to 2.2 pounds. (3 pts) Ex: Enter a list location (1 - 4): 3 Weight in pounds: 176.00 Weight in kilograms: 80.00 Sort the list's elements from least heavy to heaviest weight. (2 pts) Ex: Sorted list: [89.5, 166.3, 176.0, 236.0] Output the average and max weights as floating-point values with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value))   Use Python, please.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

8.23 LAB: Warm up: People's weights (Lists)

 

Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output the 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]

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)

Output the max list element with two digits after the decimal point. (1 pt)

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] Average weight: 166.95 Max weight: 236.00

Prompt the user for a number between 1 and 4. Output the weight at the user specified location and the corresponding value in kilograms. 1 kilogram is equal to 2.2 pounds. (3 pts)

Ex:

Enter a list location (1 - 4): 3 Weight in pounds: 176.00 Weight in kilograms: 80.00

Sort the list's elements from least heavy to heaviest weight. (2 pts)

Ex:

Sorted list: [89.5, 166.3, 176.0, 236.0]

Output the average and max weights as floating-point values with two digits after the decimal point, which can be achieved as follows:
print('{:.2f}'.format(your_value))

 

Use Python, please.

LAB
8.23.1: LAB: Warm up: People's weights (Lists)
0/9
ACTIVITY
main.py
Load default template.
1 # FIXME (1): Prompt for four weights. Add all weights to a list. Output list.
2
3 # FIXME (2): Output average of weights.
4
5 # FIXME (3): Output max weight from List.
6
7 # FIXME (4): Prompt the user for a list index and output that weight in pounds and kilograms.
8.
9 # FIXME (5): Sort the list and output it.
Transcribed Image Text:LAB 8.23.1: LAB: Warm up: People's weights (Lists) 0/9 ACTIVITY main.py Load default template. 1 # FIXME (1): Prompt for four weights. Add all weights to a list. Output list. 2 3 # FIXME (2): Output average of weights. 4 5 # FIXME (3): Output max weight from List. 6 7 # FIXME (4): Prompt the user for a list index and output that weight in pounds and kilograms. 8. 9 # FIXME (5): Sort the list and output it.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY