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 6. Calculating lean body mass Write a program to perform the

image text in transcribedimage text in transcribedimage text in transcribed

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

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 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. 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

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

Algorithmic Trading Navigating The Digital Frontier

Authors: Alex Thompson

1st Edition

B0CHXR6CXX, 979-8223284987

More Books

Students also viewed these Databases questions