add iterate_f function and associated test func

This commit is contained in:
ASPP Student 2025-09-23 18:13:34 +03:00
parent c11156fb80
commit 51eab93255
2 changed files with 16 additions and 1 deletions

View file

@ -2,3 +2,10 @@
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