TORONTO KIDS COMPUTER CLUB | Aurora Monday 18:30 Python Homework 21.05.03.
19381
post-template-default,single,single-post,postid-19381,single-format-standard,ajax_fade,page_not_loaded,,no_animation_on_touch,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Aurora Monday 18:30 Python Homework 21.05.03.

05 May Aurora Monday 18:30 Python Homework 21.05.03.

Question:

The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in meters) and weight (in kilograms), then calculates the BMI using the formula:

BMI = weight / (height * height)

Write a program which prompts for the patient’s height and weight, and uses function to calculate the BMI, and displays the corresponding message from the table below:

BMI Category Message
More than 25 Overweight
Between 18.5 and 25.0 (inclusive) Normal
weight Less than 18.5 Underweight

Sample Input 1:

Enter weight: 69
Enter height: 1.73

Sample output 1:
Normal weight

No Comments

Sorry, the comment form is closed at this time.