Python Forum
How can I find the value of k(subscript t+1) for periods t=1...50?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I find the value of k(subscript t+1) for periods t=1...50?
#2
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
>>> 
Reply


Messages In This Thread
RE: How can I find the value of k(subscript t+1) for periods t=1...50? - by Gribouillis - Nov-06-2021, 10:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in Int object is not subscript-able. kakut 2 1,293 Jul-06-2022, 08:31 AM
Last Post: ibreeden
  Error in Int object is not subscript-able. How to debug this ? yanDvator 1 2,321 Aug-03-2020, 02:28 PM
Last Post: Larz60+
  word subscript Staph 1 1,884 Mar-31-2020, 10:21 AM
Last Post: buran
  Super/subscript copied to word lk89 4 7,171 Oct-13-2016, 04:13 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020