# File: chaos1.py # A simple program illustrating chaotic behavior # # This does *no* error checking # See chaos2.py for it done right # # Matt Bishop, ECS 10, Winter 2012 # # announce what the program does print("This program illustrates a chaotic function") # ask, and convert it to a float x = float(input("Enter a number between 0 and 1: ")) # # now apply the chaotic function 100 times # for i in range(100): x = 3.9 * x * (1 - x) print(x)