Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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.

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: main() - the primary module of the program. In this module of the program. In this module, you will ask the user to input his/her height in inches and his/her weight in pounds. The module the calls the calcBMI module with the appropriate parameters in the proper order. calc BMI() - this module should be defined with a parameter for height and a parameter for weight. The module will then take the parameters and apply it ti the following formula: bmi = weight * 703 /height **2 The module should then output the user's BMI based on the values it received. This should be a simple program that a anyone could read and understand

Explanation / Answer


up vote2down vote


  """  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)
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote