HW #05

Totall runs as-is but thought you should consider the reference implementation which saves a bit of effort. The more you compactly you can think about your coding the more efficient you'll be both in terms of execution but also just as a developer yourself:

        num_temp = float(temperature[:-1])
        input_format = temperature.lower()[-1]
        
        if input_format == output_format:
            converted = num_temp
        elif output_format == 'c' and input_format == 'f':
            converted = fahrenheit_to_celsius(num_temp)
        elif output_format == 'f' and input_format == 'c':
            converted = celsius_to_fahrenheit(num_temp)
        else:
            converted = None

        return converted