@anonymous/BustlingRespectfulAcornwoodpecker

No description

Files

- main.py

main.py

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

```
print "This program will let you calculate iterations of composition of a function like f(f(f(x)))"
initial_value = float(input("What initial value for x do you want to use? "))
number_of_iterations = 5 #You can change this if you are not sure if a number 'escapes' or not, but you shouldn't need to do so.
def calc_function(x):
return x**2 #The function value for x^2 is calculated here. You can change this function, but keep it simple!
old_value = initial_value
for i in range(number_of_iterations):
new_value = calc_function(old_value)
print new_value
old_value = new_value
```

Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.8.2] on linux