The temperature utility module file has the following code. def CtoF(temp): '''Convert Celsius temperature to Fahrenheit temperature''' return 9 / 5 * temp + 32 def FtoC(temp): '''Convert Fahrenheit temperature to Celsius temperature''' return 5 / 9 * (temp - 32) def CtoK(temp): '''Convert Celsius temperature to Kelvin temperature''' return temp + 273.15 def KtoC(temp): '''Convert Kelvin temperature to Celsius temperature''' return temp - 273.15 The utility.py module is uploaded to zyBook. Write a program that imports the utility module. Using the utility module, write two functions called FtoK() and KtoF() as shown below. def FtoK(tempF) where tempF is Fahrenheit temperature. def KtoF(tempK) where tempK is Kelvin temperature. The temperature program reads two inputs. The first input is Fahrenheit temperature and the second input is Kelvin temperature. It displays the corresponding Kelvin temperature and Fahrenheit temperature. For example, if the user input is: 212 273.15 the output is: 373.15 32.0 You must use the functions found in the utility module. I have an error message saying that the FtoK utility has no attribute, I need some clarification on how it has no attribute when the function has been defined.
The temperature utility module file has the following code.
def CtoF(temp): '''Convert Celsius temperature to Fahrenheit temperature''' return 9 / 5 * temp + 32 def FtoC(temp): '''Convert Fahrenheit temperature to Celsius temperature''' return 5 / 9 * (temp - 32) def CtoK(temp): '''Convert Celsius temperature to Kelvin temperature''' return temp + 273.15 def KtoC(temp): '''Convert Kelvin temperature to Celsius temperature''' return temp - 273.15
The utility.py module is uploaded to zyBook. Write a program that imports the utility module. Using the utility module, write two functions called FtoK() and KtoF() as shown below.
def FtoK(tempF)
where tempF is Fahrenheit temperature.
def KtoF(tempK)
where tempK is Kelvin temperature.
The temperature program reads two inputs. The first input is Fahrenheit temperature and the second input is Kelvin temperature. It displays the corresponding Kelvin temperature and Fahrenheit temperature. For example, if the user input is:
212 273.15
the output is:
373.15 32.0
You must use the functions found in the utility module.
I have an error message saying that the FtoK utility has no attribute, I need some clarification on how it has no attribute when the function has been defined.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images