I am beginning to learn python. I wrote the following module file to be imported into python, but the output in IDLE does not show anything. Please help
def main():
print("This program illustrates a chaotic function")
x=eval(input("enter a number between 0 and 1:"))
for i in range(10):
x=3.9*x*(1-x)
print(x)
main()
I used
import chaos
command to import the module, but it doesn't show any output.
chaos.py(starting with lowercase and ending with.py?) Have you put it into the correct directory?