Lesson goal: Iterating the "logistic" function with a for-loop

Previous: Iterating a function | Home | Next: Iterate for a square-root

We hope you liked the idea of interating a function as shown in a previous lesson. In this lesson, we'll iterate a famous function called the "logistic function," which is $x=cx(1-x)$. This function has a fascinating interation result, depending on what you assign to the variable $c$. In this lesson, you must keep your inital value of $x$ between $0$ and $1$, so $0< x <1$. Next try three different runs, each for these values of $c$: $c=1.5$, $c=3.2$ and $c=3.5$. See what pattern of numbers you might notice with each step.

Now you try. Try constructing a for loop that will count and display the count.

Type your code here:

See your results here: