updated functions
This commit is contained in:
parent
671fcd2145
commit
5205ba24f2
2 changed files with 23 additions and 14 deletions
|
@ -1,4 +1,12 @@
|
|||
|
||||
def f(x,r):
|
||||
return r * x * (1-x)
|
||||
|
||||
|
||||
def iterate_f(it, x, r):
|
||||
result = [x]
|
||||
|
||||
for i in range(it):
|
||||
x = f(x, r)
|
||||
result.append(x)
|
||||
|
||||
return result
|
Loading…
Add table
Add a link
Reference in a new issue