Nov-06-2021, 10:28 PM
Use a "for" loop to compute the sequence
>>> delta, s, theta = 0.08, 0.3, 0.35 >>> k = 2.5 >>> for i in range(10): ... k = (1 - delta) * k + s * k ** theta ... print(f"{i:3d}: {k}") ... 0: 2.7134283534178376 1: 2.9218081528946036 2: 3.124679201001941 3: 3.321700371622801 4: 3.512629012329435 5: 3.69730401824454 6: 3.8756318212738003 7: 4.04757472314622 8: 4.2131411328686434 9: 4.372377365759764 >>>