Hello, can someone please help me correct this code? I greatly appreciate it.
7.16 Ch 7 Warm up: People's weights (Lists) (Python 3)
(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 (0 - 3): 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]
Code
******
Output
********
if you have any doubt then
please ask me without any hesitation in the comment section below ,
if you like my answer then please thumbs up for the answer , before
giving thumbs down please discuss the question it may possible that
we may understand the question different way and we can edit and
change the answers if you argue, thanks :)
Hello, can someone please help me correct this code? I greatly appreciate it. 7.16 Ch 7...
Hi,
I need some help with the following question. I need the answer
in Python please.
10.23 LAB: Warm up: People's weights (Lists) (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...
ZYBOOKS LAB: 10.23.1 Hello, I'm trying to solve this problem with creating a program code in Python about People's Weights. Here is the question: 10.23 LAB: Warm up: People's weights (Lists) (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]...
14.5 Prog 5: People's weights (arrays) JAVA (1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array'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...
5.18 Ch 5 Warm up: People's weights (Vectors) (C++) (1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in a vector of doubles. Output the vector'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 89.5 142 166.3 93 (2) Also output the total weight, by summing...
5.23 LAB: Warm up: People's weights (1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array'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....
Need a basic program in C using the instructions above.
Thanks.
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's numbers on one line, each number followed by one space. (2 pts) Ex: Enter weight 1: 236 Enter weight 2: 89.5 Enter weight 3: 142 Enter weight 4: 166.3 Enter weight 5: 93 You entered 236.000000 89.500000 142.000000 166.300000 93.000000 (2) Also output the total weight,...
Can someone please help me with this Python code? Thank you in advance, Zybooks keeps giving me errors. Thanks in advance!! This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program). (1) Extend the ItemToPurchase class to contain a new attribute. (2 pts) item_description (string) - Set to "none" in default constructor Implement the following method for the ItemToPurchase class. print_item_description() - Prints item_description attribute for an ItemToPurchase object. Has an ItemToPurchase parameter. Ex. of...
Hi please help with c++ programming.
This is my code. there's a syntax error. PLEASE FIX MY CODE
instead of re-designing the program.
Thanks
/*
Description of problem:
Introduction to Friends functions.
Create objects in the stack (not on the heap)
3.1: Add a friend function, kilotopound, which will convert
kilograms to pounds.
3.2: Add a copy constructor utilizing Lab 3.1 code.
Copy the fist object using a copy constructor. Output the contents
of both objects.
*/
#include <iostream>...
5.19 Lab 11b: Soccer team roster Instructor note: NOTE Unlike our other assignments, this one has only two programs: People's Weights and this one. To earn 30 points, you must do both assignments. Allow ample time to complete them Passing arrays to methods Review Chapter 6.8 Array Parameters if you wish to use methods in your program (a good idea). Since we pass a reference to the array's location in memory, changes made to the array within the method will...
Hello I need some help with my CC+ project.
My current project erasing the first two phone numbers and only
printing the 3rd phone number out in the list. Any idea on how to
correct.
Here is the error.
Contacts.h
#ifndef Contact_H
#define Contact_H
#include<string>
using namespace std;
class ContactNode{
public:
ContactNode();
ContactNode(string name, string phone);
void InsertAfter(ContactNode*);
string GetName();
string GetPhoneNumber();
ContactNode* GetNext();
void PrintContactNode();
private:
string contactName;
string contactPhoneNum;
ContactNode* nextNodePtr;
};
#endif
Contacts.cpp
#include <iostream>
#include "Contacts.h"...