# tempconversion.py
# Functions
def to_centigrade(x):
return 5*(x-32)/9.0
def to_fahrenheit(x):
9*x/5.0 + 32
# Constants
FREEZING_C = 0.0
FREEZING_F = 32.0
——————————————————————-
# our program
# if we import as following
import tempconversion
# then, our function calls would be as following
a = tempconversion.to_centigrade(20)
# if we import as following
from tempconversion import to_centigrade
# then we can directly use the function imported without the prefix
a = to_centigrade(20)