Skip to content

Commit 314d64c

Browse files
Merge pull request #238 from tanakachingonzo/master
A simple program illustrating chaotic behaviour
2 parents 6311956 + 7e74f81 commit 314d64c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

chaos.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# A simple program illustrating chaotic behaviour
2+
3+
def main():
4+
print ("This program illustrates a chaotic function")
5+
x = float((input("Enter a number between 0 and 1: ")))
6+
for i in range(10):
7+
x = 3.9 * x * (1-x)
8+
print (x)
9+
10+
main()
11+

0 commit comments

Comments
 (0)