Advertisement
shegues

Chaos2.py

Jan 18th, 2021
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. # A simple program that simulate
  2. # a chaotic behaviour
  3. def main():
  4.     print("This program illustrates a chaotic behavior")
  5.     x = eval(input("Enter a number between o and 1: "))
  6.     for i in range(10):
  7.         x = 3.9 * x * (1 - x)
  8.         print(x)
  9. main()
  10.  
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement