Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a program (python) that asks the user to enter two values for weight and height respectively. The program checks whether the two entered values

write a program(python) that asks the user to enter two values for weight and height respectively. The program checks whether the two entered values are valid. The value for weight should be between 100 and 400 pounds and the value for height should be between 48 and 84 inches. If any of the values are not valid, the program asks the user to try to re-enter two values. If, after three tries, one of the two entered values are valid, the program calculated BMI and displays a message:"Underweight"(if BMI=30)

BIM =image text in transcribed

(weight in pounds is weight in pounds; height in inches is height in inches)

when I run the program, if I entered three times incorrect, it should be like this:

Enter weight in pounds: 500 Enter height in inches: 400 Enter weight in pounds: 500 Enter height in inches: 400 Enter weight in pounds: 600 Enter height in inches: 700 Invalid input.

703 * (weightinpounds)/(heightininches)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions