Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The programs have to be done with Python with NumPy, Pandas and Matplotlib Exercise 1: Converting a list of weights from kilograms to pounds First,

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

The programs have to be done with Python with NumPy, Pandas and Matplotlib

Exercise 1: Converting a list of weights from kilograms to pounds First, convert the list of weights from a list to a Numpy array. Then, convert all of the weights from kilograms to pounds. Use the scalar conversion of 2.2 lbs per kilogram to make your conversion. Lastly, print the resulting array of weights in pounds. Exercise 2. Calculate the Energy Cost by Appliance This exercise asks you to estimate electricity usage of your household and electric bill. To estimate electricity usage of a particular appliance or electronic device, you'll need three figures: the wattage of the appliance, the average number of hours you use it per day, and the price you pay per kilowatt-hour (kWh) of electricity. The average daily use is easy enough to figure. To determine the wattage of an appliance, look for a label or metal plate, which is usually in an inconspicuous place like the back or bottom of the appliance or device. If the wattage is listed, it will have a "W" at the end. If you can't find a label, check the appliance's original documentation or try searching online for its technical specs. Once you have your data, calculate the cost of use with this formula: 1. Multiply the device's wattage by the number of hours the appliance is used per day 2. Divide by 1000 3. Multiply by your kWh rate Example: If you have a 250 watt television that you watch five hours per day, it consumes 1250 watt- hours per day (250 x 5 = 1250). Divide 1250 by 1000 to convert 1250 watt-hours into 1.25 kWh (1250 - 1000 = 1.25). If your electricity rate is 12 cents per kWh, that means it costs 15 cents per day to use your television (1.25 x 12 = $0.15). That should account for about $4.50 of your monthly electric bill (0.15 x 30 = $4.50). Develop a program to estimate the monthly electric bill for all the appliances, electronics and lights of a typical family. Exercise 3. Calculating the standard deviation of a set of numbers The formula for standard deviation: o= V (3 )? i=1 To calculate the standard deviation of those numbers: 1. Work out the mean (the simple average of the numbers) 2. Then for each number: subtract the Mean and square the result 3. Then work out the mean of those squared differences. 4. Take the square root of that Create a program to calculate the standard deviation of a set of numbers. The number of numbers in the set can range from 5 to 20. Numbers are entered in a set. Exercise 4. Ideal body weight and adjusted body weight Write a program to (1) plot the graphs of the ideal body weights (IBM) for males and females for the heights ranging from 50 inches to 78 inches, and (2) asking the users to enter their sex, weight, and height, then calculate their adjusted body weight (ABW). Then show their actual weight and adjusted boy weight on the graphs. Exercise 5. Calculate how much water you shall drink Example: The 25 years old, 138 pounds woman shall drink about 11 cups or 2.62 liters of water daily. Write a program to generate graphs showing the amount of water a person shall drink based on body weight and age. Note: Each age range shows one curve. Prompt the user to enter his/her age and weight to recommend the amount of water to drink daily in cups and liters, respectively. Exercise 6. Calculating lean body mass Write a program to perform the following tasks: 1. Generate graphs to show the weight vs height for the percentage of LBM being 75% for men and 70% for women. The independent value (x-axis) of the graphs is height ranging from 145 cm to 200 cm. 2. Ask the users to enter the following inputs: Sex: m for male, f for female Height: in cm Weight: in kg 3. Calculate the user's LBM and LBM%. 4. Calculate the recommended maximum weight for the user. Exercise 7. Calculating how many calories do you burn during exercises Calculate weight loss: Divide the burned calories by 7700 to obtain the weight loss (in kg). Example: Activity: Running at 6 miles per hour (MET = 9.8) Weight of the person: 70 kg Duration of the activity: 1 hour Calories burned =T * 60 * MET * 3.5 * W / 200 = 1 * 60 * 9.8 * 3.5 * 70/200 = 720.3 Weight loss = Calories burned / 7700 = 0.094 kg = 0.21 (or 0.094 * 2.2) lb 7) In this exercise you develop a program to calculate the calories burned and weight loss for a combination of exercises a person does for a day. The exercises include the following popular types: Bicycling (12-14 mph) Jumping rope Running at 6 mph Playing tennis Playing basketball Walking for exercises Swimming Hiking Prompt the user to enter: Weight in kg Bicycling: yeso, how many minutes Jumping rope: yeso, how many minutes Running at 6 mph: yeso, how many minutes Playing tennis: yeso, how many minutes Playing basketball: yeso, how many minutes Walking for exercises: yeso, how many minutes Swimming: yeso, how many minutes Hiking: yeso, how many minutes Calculate the total calories burned and weight loss. Exercise 8. Calculating Daily Calorie Requirement In this exercise you develop a program to calculate the calories burned and weight loss for a combination of exercises a person does for a day. The exercises include the following popular types: Bicycling (12-14 mph) Jumping rope Running at 6 mph Playing tennis Playing basketball Walking for exercises Swimming Hiking Prompt the user to enter: Weight in kg Bicycling: yeso, how many minutes Jumping rope: yeso, how many minutes Running at 6 mph: yeso, how many minutes Playing tennis: yeso, how many minutes Playing basketball: yeso, how many minutes Walking for exercises: yeso, how many minutes Swimming: yeso, how many minutes Hiking: yeso, how many minutes Calculate the total calories burned and weight loss

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems On GPUs In Databases

Authors: Johns Paul ,Shengliang Lu ,Bingsheng He

1st Edition

1680838482, 978-1680838480

Students also viewed these Databases questions

Question

orlivent sin0 H23, TME 820,157 (17) 300 ) P20 091

Answered: 1 week ago

Question

The company has fair promotion/advancement policies.

Answered: 1 week ago