Question: Add comments on a revision of chaos.py program, which modify it so that it accepts two inputs and prints a table with two columns (Revised
Add comments on a revision of chaos.py program, which modify it so that it accepts two inputs and prints a table with two columns (Revised file goes here. File name: chaos_v5.py) # Students are required to add COMMENTS to explain EACH statement line by line # File Name: chaos_v5.py # Add comments on a revision of chaos.py program, which modify # it so that it accepts two inputs and prints a table (no need to be perfect) # with two columns similar to the one shown in textbook Page 18. def main(): print("This program illustrates a chaotic function") x = eval(input("Enter a number between 0 and 1: ")) y = eval(input("Enter a number between 0 and 1: ")) print ("input ",x, " ",y) for i in range(10): x = 3.9 * x * (1 - x) y = 3.9 * y * (1 - y) print(" ",x, " ",y) main()
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
