def fee(FT, FC, TI): if FC == "SFR": if TI >= 99.5 and TI < 2000.5: FT = 1 elif TI >= 2000.5 and TI < 2900.5: FT = 2 elif TI >= 2900.5 and TI < 3900.5: FT = 3 elif TI >= 3900.5 and TI < 7500.5: FT = 4 elif TI >= 7500.5: FT = 5 else: FT = NotImplemented return FT