Write a simple program using modules that will calculate a person\'s body mass i
ID: 3549978 • Letter: W
Question
Write a simple program using modules that will calculate a person's body mass index (BMI). Because of the limitations of the chapter, we will not be able to diagnose whether the person is underweight, normal, overweight, or obese.
You should create the following modules in your program:
bmi = weight * 703 / height ** 2
This should be a simple program that a anyone could read and understand.
Explanation / Answer
""" BMI Calculator 1. Obtain weight in pounds and height in inches 2. Convert weight to kilograms and height to meters 3. Calculate BMI with the formula weight/height^2 """ #prompt user for input from keyboard weight= input ("How much do you weigh (in pounds)?") #this get's the person's weight in pounds weight_in_kg= weight/2.2 #this converts weight to kilograms height= input ("What is your height (in inches)?") #this gets the person's height in inches height_in_meter=height*2.54/100 #this converts height to centimeters bmi=weight_in_kg/(height_in_meter**2) #this calculates BMI print (bmi) Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.