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 18.5
Normal weight: BMI between 18.5 and 24.9
Overweight: BMI between 25 and 29.9
Obesity: BMI 30 or above
Instructions:
1. Prompt the user to enter their weight in kilograms as a floating-point number.
2. Prompt the user to enter their height in centimeters as a floating-point number.
3. Convert the height from centimeters to meters by dividing the height by 100.
4. Calculate the BMI using the formula and round it to one decimal place.
5. Assign a number (1 to 4) to the BMI category using arithmetic operations:
Category 1 represents Underweight.
Category 2 represents Normal weight.
Category 3 represents Overweight.
Category 4 represents Obesity.
Use arithmetic to assign the correct category number based on the BMI value.
6. Output the BMI value and the corresponding category number.
Hint: You can use arithmetic operations to combine boolean expressions (True/False) 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!