Answer :
Final answer:
Option (a) is correct: the code should be placed in temp_fahrenheit_rankine.py and contains two functions that convert between Fahrenheit and Rankine by adding or subtracting 459.67.
Explanation:
The correct code segment for implementing a custom module called temp_fahrenheit_rankine.py that converts temperatures between the Fahrenheit and Rankine scales is option (a). You would place the following code in the file named temp_fahrenheit_rankine.py:
# Converts temperatures between Fahrenheit and Rankinedef to_rankine(fahrenheit):
# Accepts degrees Fahrenheit
# Returns degrees Rankine
rankine = fahrenheit + 459.67
return rankine
def to_fahrenheit(rankine):
# Accepts degrees Rankine
# Returns degrees Fahrenheit
fahrenheit = rankine - 459.67
return fahrenheit
In this module, the function to_rankine accepts a Fahrenheit temperature and returns its Rankine equivalent by adding 459.67. Similarly, the function to_fahrenheit accepts a Rankine temperature and returns its Fahrenheit equivalent by subtracting 459.67. These conversions are based on the fact that the Rankine scale is based on the Fahrenheit scale, with the zero point at absolute zero.