#Exer. 4.5 from "A primer on..." """ The exercise only asks us to handle missing arguments, but we added the code to handle arguments that cannot be converted to float. """ import sys try: F = float(sys.argv[1]) except IndexError: print('Please provide the temperature as a command line argument.') exit() except ValueError: print('The provided temperature must be a pure number.') exit() C = (F-32)*5.0/9 print(f'{F} degrees F is {C:.2f} degrees C') """ Terminal> python f2c_cml_exc.py 78 78.0 degrees F is 25.56 degrees C Terminal> python f2c_cml_exc.py Please provide the temperature as a command line argument. Terminal> python f2c_cml_exc.py 78F The provided temperature must be a pure number. """