12 CHAPTER1. COMPUTERSANDPROGRAMS
x = 2.0 * x * (1 - x)
Runtheprogramforvariousinputvaluesandcomparetheresultstothoseobtainedfromtheoriginal
program.Writea shortparagraphdescribingany differencesthatyounoticeinthebehaviorofthetwo
versions.
- ModifytheChaosprogramfromSection1.6sothatit printsout 20 valuesinsteadof10.
- (Advanced)ModifytheChaosprogramsothatit acceptstwo inputsandthenprintsa tablewithtwo
columnssimilartotheoneshowninSection1.8. (Note: Youwillprobablynotbeabletogetthe
columnstolineupasnicelyasthoseintheexample.Chapter4 discusseshow toprintnumberswitha
fixednumberofdecimalplaces.)