Question: In this assignment, you are asked to implement two calculators using Python: One is to perform a temperature conversion between the Fahrenheit and Celsius temperature
In this assignment, you are asked to implement two calculators using Python: One is to perform a temperature conversion between the Fahrenheit and Celsius temperature systems. The other is to calculate Body Mass Index (BMI) given a persons height and weight.
- Temperature Conversion (5 points)
The component will convert a body temperature measured in Fahrenheit to Celsius and vice versa. The input could be a reading in either system. After the conversion, the corresponding measure in the other system should be output to the user. Equations for the conversions between the two temperature systems are:
F = 9.05.0C+32.0 (from Celsius to Fahrenheit)
C = 5.09.0(F-32.0) (from Fahrenheit to Celsius)
F is the value in Fahrenheit and C is the value in Celsius.
- Body Mass Index (10 points)
This component allows a user to calculate Body Mass Index (BMI) given a persons height and weight. The equations for the calculation are:
BMI=Weight in Pound 703(Height in inchese)2
or
BMI=Weight in Kilogram (Height in Meters)2
Please note the square operation in the equations.
After calculating the BMI, the program should provide some alerts back the user based on the result. The categories are:
| BMI | CATEGORY |
| below 18.5 | Underweight |
| 18.5 24.9 | Normal |
| 25 29.9 | Overweight |
| 30 and above | Obese |
The features of Python you learned from this weeks lecture and activities will be sufficient for the assignment. Users of the program must be able to enter data after being prompted.
If the assignment becomes extremely difficult for you, you can use flowchart or pseudocode to complete the assignment. However, a 5-point deduction will be applied due to incompletion of the assignment.
Expected output could be similar to the screenshots at the end of the document. However, you are encouraged to complete your own version of Python code not following the exact same output sequences.


^this is what i have so far
Active Python 2.7.2.5 (ActiveState Software Inc.) based on Python 2.7.2 (default, Jun 24 2011, 12:22:14) [MSC v. 1500 64 bit (AMD64)] on win 32 Type "copyright", "credits" or "license()" for more information. BBB RESTART What do you want to do (1: Temperature Conversion, 2: BMI) 1 What is the measurement system? (1: Celsius, 2: Fahrenheit) 1 How many degrees is the temperature 240 The temperature in Fahrenheit is 104 >>> ===== RESTART ==== What do you want to do (1: Temperature Conversion, 2: BMI) 1 What is the measurement system? (1: Celsius, 2: Fahrenheit)2 How many degrees is the temperature 2104 The temperature in Celsius 13 40 SEE RESTART RE- What do you want to do (1: Temperature Conversion, 2: BMI)2 What is the measurement system (1: Metric, 2: English)1 What is your weight in kilogram? 100 What is your height in meter? 1.90 Your BMI i3 27.7008310249 . You are overweight! -EEEEEEEEEEEEEEEEEEE- RESTART SERENEE SEEN >>> What do you want to do (1: Temperature Conversion, 2: BMI) 2 What is the measurement system (1: Metric, 2: English) 2 What is your weight in lb? 200 What is your height in inches? 75 Your BMI is 24.9955555556 . You are normal! >>> name = input ("Welceom, what is your name?") age - float(input("What is your age?") #function to convert temprature based on user input and needs def convert (s, t): if s == "f": newTemp = (t-32)*5/9 elif s == "C": newTemp = t*9/5 + 32 else: print("wrong button") return newTemp def calcBMI (b,w): if b == "i": newHeight = weight*703/height elif W == "p": newWeight = weight*703/height return bmi # main program starts here ForC = input ("Is the tempratrue in F or C? Press F for Fehernhit, Press C for Celsius") Temp - float(input ("What is the the temprature?") print ("the new temprature is ", convert(Forc, Temp)) height - float(input("Is your height in Inches of Meters? Press I for Inches, Press M for Meters ")) weight - float(input("Is your weight in Pounds of Kilograms? Press P for Pounds, Press K for Kilogran bmi - calcBMI (height, weight) if bmi
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
