Question: Write a Python program that prompts the user for their weight in kilograms and height in centimeters. The program should calculate the user's BMI and
Write a Python program that prompts the user for their weight in kilograms and height in
centimeters. The program should calculate the user's BMI and categorize it into one of four
categories: Underweight, Normal weight, Overweight, or Obesity.
BMI Categories:
Underweight: BMI less than
Normal weight: BMI between and
Overweight: BMI between and
Obesity: BMI or above
Instructions:
Prompt the user to enter their weight in kilograms as a floatingpoint number.
Prompt the user to enter their height in centimeters as a floatingpoint number.
Convert the height from centimeters to meters by dividing the height by
Calculate the BMI using the formula and round it to one decimal place.
Assign a number to to the BMI category using arithmetic operations:
Category represents Underweight.
Category represents Normal weight.
Category represents Overweight.
Category represents Obesity.
Use arithmetic to assign the correct category number based on the BMI value.
Output the BMI value and the corresponding category number.
Hint: You can use arithmetic operations to combine boolean expressions TrueFalse and
convert them into numerical values that correspond to the different BMI categories.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
