Question: # convert.py # A program to convert Celsius temps to Fahrenheit # by: Susan Computewell def main(): celsius = eval(input(What is the Celsius temperature? ))
# convert.py
# A program to convert Celsius temps to Fahrenheit
# by: Susan Computewell
def main():
celsius = eval(input("What is the Celsius temperature? ")) fahrenheit = 9/5 * celsius + 32
print("The temperature is", fahrenheit, "degrees Fahrenheit.") main()
- 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
