In python
(1) prompt the user to enter four numbers, each corresponding to a person's we...
Computers and Technology, 12.11.2019 21:31 lizzyhearts
In python
(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 index 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]
Answers: 3
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
Computers and Technology, 24.06.2019 07:00
Into what form does the barcode reader convert individual bar patterns?
Answers: 1
Computers and Technology, 24.06.2019 07:30
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
Computers and Technology, 25.06.2019 08:20
The control unit takes ths instructions fetched by the preteched unit and translates them into a form that can be understood by
Answers: 1
History, 25.07.2019 21:30
History, 25.07.2019 21:30
Mathematics, 25.07.2019 21:30
History, 25.07.2019 21:30
History, 25.07.2019 21:30
English, 25.07.2019 21:30
Geography, 25.07.2019 21:30
Mathematics, 25.07.2019 21:30
History, 25.07.2019 21:30
Mathematics, 25.07.2019 21:30
English, 25.07.2019 21:30
History, 25.07.2019 21:30
Mathematics, 25.07.2019 21:30
English, 25.07.2019 21:30
Mathematics, 25.07.2019 21:30