<prompt> Andika kazi Python ambayo hufanya hivi: f1 1 f2 2 fn 3 fn-1 2 fn-2 pato la namba 3 za mwisho za fn au tarakimu zote kama fn ni chini ya 100 kubadilishwa kuwa integer yaani, sifuri zote zisizo za lazima za kuongoza zimeondolewa.  <response>: Heres a Python function that implements the formula for fn and outputs the last 3 digits or all digits if fn is less than 100 converted to an integer:pythondef fn: if n 1: return 1 elif n 2: return 2 else: fn_1 fn-1 fn_2 fn-2 fn 3fn_1 2fn_2 if fn 100: return fn else: return intstrfn-3: 