Write an improved version of the chaos . py program from Chapter 1 that allows a user to | StudySoup

Textbook Solutions for Python Programming: An Introduction to Computer Science

Chapter 5 Problem 11

Question

Write an improved version of the chaos . py program from Chapter 1 that allows a user to input two initial values and the number of iterations,and then prints a nicely formatted table showing how the values change over time. For example, if the starting values were . 25 and . 26 with 10 iterations, the table might look like this: index 0.25 0.26 ---------------------------- 1 0 . 731250 0 . 750360 2 0 . 766441 0 . 730547 3 0 . 698135 0 . 767707 4 0 . 821896 0 . 695499 5 0 . 570894 0 . 825942 6 0 . 955399 0 . 560671 7 0 . 166187 0 . 960644 8 0 . 540418 0 . 147447 9 0 . 968629 0 . 490255 10 0.118509 0 . 974630

Solution

Step 1 of 3)

The first step in solving 5 problem number 36 trying to solve the problem we have to refer to the textbook question: Write an improved version of the chaos . py program from Chapter 1 that allows a user to input two initial values and the number of iterations,and then prints a nicely formatted table showing how the values change over time. For example, if the starting values were . 25 and . 26 with 10 iterations, the table might look like this: index 0.25 0.26 ---------------------------- 1 0 . 731250 0 . 750360 2 0 . 766441 0 . 730547 3 0 . 698135 0 . 767707 4 0 . 821896 0 . 695499 5 0 . 570894 0 . 825942 6 0 . 955399 0 . 560671 7 0 . 166187 0 . 960644 8 0 . 540418 0 . 147447 9 0 . 968629 0 . 490255 10 0.118509 0 . 974630
From the textbook chapter Sequences: Strings, Lists, and Files you will find a few key concepts needed to solve this.

Step 2 of 7)

Visible to paid subscribers only

Step 3 of 7)

Visible to paid subscribers only

Subscribe to view the
full solution

Title Python Programming: An Introduction to Computer Science 3 
Author John Zelle
ISBN 9781590282755

Write an improved version of the chaos . py program from Chapter 1 that allows a user to

Chapter 5 textbook questions

×

Login

Organize all study tools for free

Or continue with
×

Register

Sign up for access to all content on our site!

Or continue with

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back