Question: PORTION ONE: Based the convert.py, so it can convert temperatures from Fahrenheit to Celsius, instead of original Celsius to Fahrenheit. Make sure to change the

PORTION ONE: Based the convert.py, so it can convert temperatures from Fahrenheit to Celsius, instead of original Celsius to Fahrenheit. Make sure to change the message to reflect the change of introduction and final result.

Name it as: convert_v2.py.

Run it to see what the result is.

.

PORTION TWO: Based the convert.py, so it can convert distances measured in kilometers to miles. (1 km = 0.62 mile). Make sure the message is appropriate.

Name it as: convert_v3.py.

Run it to see what the result is.

.

PORTION THREE: Based the convert.py, so it can convert height measured in feet and inch to inches only. (e.g. 5 feet 2 inch will be ??? inches). Make sure the message is appropriate. The testing input should BOTH feet and inch as height.

Name it as: convert_v4.py.

Run it to see what the result is.

***The program needs to let user to have chance to input, so the program will create/make output, but not with the fixed input within the python program when you write it. The input should be type in by the user over the interactive window/shell. It should also work when entered into IDLE****

PORTION ONE:

def convert(): print "This program converts fahrenheit to celsius " print "What is the Fahrenheit temperature? " fahrenheit = input() celcius = 5.0/9.0 * (fahrenheit - 32.0) print "Aha, I know The temperature is", celcius, "degrees Celsius." convert()

PORTION TWO

def convert(): print "This program converts kilometers to miles " print "What is the distance in kilometer? " kilometer = input() miles = kilometer/0.62 print "Aha, I know The distance is", miles, "miles." convert()

PORTION THREE

def convert(): print "This program converts height in feet and inches to inches " print "What is the height in feet? " feet = input() print "What is the height in inches? " inches = input() totalInches = feet*12 + inches print "Aha, I know The height is", totalInches, " inches." convert()

(Or please let me know how I can fix the program above so that an error does not appear)

Thank you.

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 Databases Questions!