1. Engineering
  2. Computer Science
  3. 1 open idle shell then click file gtnew file type...

Question: 1 open idle shell then click file gtnew file type...

Question details

1. open IDLE Shell, then click File -->New File, type or copy/paste chaos.py file into IDLE Scripts mode. (Find chaos.py file here: http://mcsp.wartburg.edu/zelle/python/ppics2/code/chapter01/

2. For Project 1, you need to modify chaos.py program in THREE different ways:

  • PORTION ONE: Modify the chaos.py program so that it prints out 16 values instead of original 10.
  • PORTION TWO: Modify the chaos.py program so that the number of values to print is determined by the user's input. You will have to add a line near the top of the program to get another value from the user: n = eval (input ("How many numbers you want to print? ")). You also need to change the for i in range (10) to for i in range (n).
  • PORTION THREE: Add comments to a revision of chaos.py program: chaos_v5.py, which is modified, so that it accepts two inputs and prints a table with two columns similar to the one shown in textbook Page 18.

2. For each portion, run them one by one. Click Run --> Run Module (or just simple click shortcut F5). Respond this program within the Interactive mode.

3. If it does not work, check your codes again, DEBUG it, run again until it works.

4. For each portion, Copy/Paste .py file and running result into a single .txt file (you can use Notepad in Windows, or Text Edit in Mac, to create a .txt file), save as Project1_YourLastName.txt, see sample submission from attachment . You should keep working on this sample and modify it as needed.

5. (This lab work will due on Saturday midnight)

6. This assignment is worthy of 20 points. (10 points for each required portion of this assignments: PORTION ONE (codes and running result), PORTION TWO (codes and running result), and PORTION THREE (codes and running result))

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution