subject

(1) 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]
(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)
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
(4) 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
(5) Sort the list's elements from least heavy to heaviest weight. (2 pts)
Ex:
Sorted list: [89.5, 166.3, 176.0, 236.0]
LAB
ACTIVITY
10.23.1: LAB: Warm up: People's weights (Lists)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:50
Consider a slotted aloha system, where the time slot equals the fixed duration of each packet. assume that there are 4 stations a,b,c,d sharing the medium. (a) stations a,b,c,d receive one packet each from higher layers at times 1.3, 1.5, 2.6,5.7 respectively. show which transmissions take place when, according to the slottedaloha protocol; describe all transmissions until all four packets have been successful.when needed, each station has access to the following sequence of random number, provided by a random number generator and drawn uniformly between 0 and 1: (1) station a draws numbers: 0.31, 0.27, 0.78, 0.9, 0.9, 0.11, 0. (2) station b draws numbers: 0.45, 0.28, 0.11, 0.83, 0.37, 0.22, 0. (3)station c draws numbers: 0.1, 0.2, 0.3, 0.4, 0. (4) station d draws numbers: 0.36, 0.77, 0.9, 0.1, 0.1, 0.1, 0.1, 0. (b) in slotted aloha, a station transmits in each time slot with a given probability. what probabilities would you assign to each of the four stations so as to: (i) maximize the efficiency of the protocol? (ii) maximize fairness among the four stations? (c) will the efficiency increase or decrease if we modify slotted aloha as follows: (i) get rid of slots and allow stations to transmit immediately? (ii) implement carrier sensing? (iii) implement collision detection? (iv) implement collision avoidance?
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
You know the right answer?
(1) Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store...
Questions
question
Mathematics, 11.10.2019 17:30
question
Mathematics, 11.10.2019 17:30
Questions on the website: 13722360