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.
![1 # Define your function here
2 import utility
3
4 def FtoK(tempF):
return tempF + 273.15
6.
7 def KtoF(tempK):
return tempK - 273.15
9 if
_main_':
name
# Type your code here.
tempF = float(input())
tempk = float(input ())
10
11
12
13
tempF = utility.FtoK (tempF)
tempk = utility.KtoF(tempK)
14
15
16
print('{:.2f}'.format(tempF))
print ('{:.1f}'.format (tempk))
17
18](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2bc2a3ad-b0fb-46d0-8be8-5188cce94b42%2F4e4919f9-66ca-4c8c-89a8-35ba444952c8%2Fbf7tfxn_processed.jpeg&w=3840&q=75)
![Program errors displayed here
Traceback (most recent call last):
File "main.py", line 14, in <module>
tempF = utility.FtoK (tempF)
AttributeError: module 'utility' has no attribute 'FtoK'](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2bc2a3ad-b0fb-46d0-8be8-5188cce94b42%2F4e4919f9-66ca-4c8c-89a8-35ba444952c8%2Fsqru0i4_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)