MCPcopy Create free account
hub / github.com/geekcomputers/Python / main

Function main

chaos.py:4–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3
4def main():
5 print("This program illustrates a chaotic function")
6
7 while True:
8 try:
9 x = float((input("Enter a number between 0 and 1: ")))
10 if 0 < x and x < 1:
11 break
12 else:
13 print("Please enter correct number")
14 except Exception:
15 print("Please enter correct number")
16
17 for i in range(10):
18 x = 3.9 * x * (1 - x)
19 print(x)
20
21
22if __name__ == "__main__":

Callers 1

chaos.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected