Python 3.4.3 (default, Aug 26 2015, 18:29:14) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> >>> birth_year = 1997 >>> curr_year = 2017 >>> compute_age(birth_year, curr_year) 20 >>> birth_year = 1994 >>> compute_age(birth_year, curr_year) 23 >>> import age >>> >>> >>> input("Enter a number between 0 and 1: ") Enter a number between 0 and 1: 0.5 '0.5' >>> eval(input("Enter a number between 0 and 1: ")) Enter a number between 0 and 1: 0.5 0.5 >>> x = eval(input("Enter a number between 0 and 1: ")) Enter a number between 0 and 1: 0.5 >>> print(x) 0.5 >>> x = 3.9 * x * (1-x) >>> print(x) 0.975 >>> x = 3.9 * x * (1-x) >>> print(x) 0.09506250000000008 >>> x = 3.9 * x * (1-x) >>> print(x) 0.33549992226562525 >>> x = 3.9 * x * (1-x) >>> print(x) 0.8694649252590003 >>> x = 3.9 * x * (1-x) >>> print(x) 0.44263310911310905 >>> >>> >>> for i in range(10): print(i) 0 1 2 3 4 5 6 7 8 9 >>> for i in range(5): print(i) 0 1 2 3 4 >>> ================================ RESTART ================================ >>> This program illustrates a chaotic function Enter a number between 0 and 1: 0.5 0.975 0.09506250000000008 0.33549992226562525 0.8694649252590003 0.44263310911310905 0.962165255336889 0.1419727793616139 0.4750843861996143 0.9725789275369049 0.1040097132674683 >>> ================================ RESTART ================================ >>> This program illustrates a chaotic function Enter a number between 0 and 1: 0.55 0.9652499999999999 0.1308155062500002 0.44344095734076977 0.9625241913045383 0.14067835258652328 0.471463019430254 0.9718239988858515 0.10679024489391972 0.3720057451087238 0.9111081357878255 >>>