15. Explain the difference between import and from import statements, with examples.
15. Explain the difference between import and from import statements, with examples. Read More »
# tempConversion.py “””Conversion functions between fahrenheit and centrigrade””” # Functions def to_centigrade(x): “””Returns: x converted to centigrade””” return 5*(x-32)/9.0 def to_fahrenheit(x): “””Returns: x converted to fahrenheit””” return 9*x/5.0 + 32 # Constants FREEZING_C = 0.0 # water freezing temp.(in celsius) FREEZING_F = 32.0 # water freezing temp.(in fahrenheit) # programme import tempConversion print(tempConversion.to_centigrade(10)) # prefix