Larry
2012-02-22 16:25:18 UTC
#chaos.py
def main():
print('Hello and welcome to chaos, this program will illustrate total chaos.')
x = eval(print('Enter a number between 0 and 1: '))
for i in range(10):
x = 3.9 * x * (1-x)
print(x)
main()
and this is my result when i hit f5
Hello and welcome to chaos, this program will illustrate total chaos.
Enter a number between 0 and 1:
Traceback (most recent call last):
File "C:/Python32/chaos", line 9, in
main()
File "C:/Python32/chaos", line 4, in main
x = eval(print('Enter a number between 0 and 1: '))
TypeError: eval() arg 1 must be a string, bytes or code object
I'm using python 3.2 on windows 7