Write a Python program that asks for a patient's height in feet and inches and their weight in pounds and outputs their BMI. BMI is weight in kilograms divided the square of the height in meters (BMI units are kg/m2). Also output a message saying if the patient is obese (at least 30), overweight (at least 25 but less than 30), ideal [15-25), or underweight (<15). Your program must use elif where applicable. Here's a sample run:
Height in feet and inches: feet: 5 inches: 10 Weight in pounds: 185 weight: 83.91kg height: 1.77m BMI: 26.54 (overweight)
Write a Python program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula (called monthly compounding): futurevalue=investment⋅(1+monthlyinterestrate)numberofmonths
For example, if you enter amount 1000, annual interest rate 3.25%, and number of years 1, the future investment value is 1032.99.
Here is a sample run:
Enter investment amount: 1000 Enter annual interest rate: 4.25 Enter number of years: 1 Accumulated value is $1043.34
Write a Python program that reads in numbers from the user until she types STOP, then print out the count, the sum, and the mean, i.e., sum/count. Make sure it works even if she types STOP right away. Don't worry about handling the exception (i.e., the program "crashing") if she types in something that is not a number or STOP. Here is a sample run:
Enter a number to sum (type STOP to finish): 17 Enter a number to sum (type STOP to finish): 28 Enter a number to sum (type STOP to finish): 99 Enter a number to sum (type STOP to finish): STOP Count: 3 Sum: 144.0 Mean: 48.0
Hand in the three programs in three separate files: p2_bmi.py, p2_futval.py, p2_sum.py.
Notice that there is a version of one of these programs in your zyBook (3.13 BMI CalculatorLinks to an external site.). You can use that for practice, if you want, but to hand it in, do so here in Canvas.
157043159910/06/201911:59pm
Rubric
true
true
1017532
Can't change a rubric once you've started using it.