Question
BMI (Body Mass Index) is an indicator of high body fatness. BMI can be used to screen for weight categories that may lead to health
BMI (Body Mass Index) is an indicator of high body fatness. BMI can be used to screen for weight categories that may lead to health problems but it is not diagnostic of the body fatness or health of an individual. It is calculated as follows:
BMI = Weight in KG / Height in Meters2
The standard weight status categories associated with BMI ranges for adults are shown in the following table.
BMI | Weight Status |
Below 18.5 | Underweight |
18.5 24.9 | Normal or Healthy Weight |
25.0 29.9 | Overweight |
30.0 and Above | Obese |
Try to write a program to ask the user to continuously input the name of a person, his/her weight in KG and his/her height in meters, then it would display the persons name, weight, height, his/her BMI and the corresponding weight status on the web page.
Requirements: 1) Use function to calculate BMI. 2) Use function to evaluate the weight status. 3) Use dialog box to ask user to input data.
Output in Chrome: (Note: The default value of Name is , weight and height is 0)
After the three input values are entered, the following result will be displayed on the web page assuming that name is Tony Sam, weight is 68 and height is 1.75.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started