Fix and eat breakfast.
Go to my room.
Check the temperature and listen to the weather forecast.
Get dressed.
etc.
1.2 Find or invent an algorithm to calculate the square root of any number. Apply the algorithm to the
number 2046, finding its square root to 2 decimal places. Do not use a computer or calculator!
First take a guess: in this case 40.
Divide the number by the guess: 51.15
Find average of guess and quotient: (51.15 + 40) / 2 = 45.575
Repeat with the new guess (45.575 after the first round).
Second round result: 45.23
Third round result: 45.232
(from: http://www.homeschoolmath.net/teaching/square-root-algorithm.php)
1.3 Perl is a computer language that is often used for quick, one-off programming jobs, like converting text
in a document from one format to another. ADA is a language used for Department of Defense
applications where human life may be at stake. What differences would you imagine to find when you
compare Perl with ADA?
Perl: little type checking of variables
lots of default assumptions and short-cuts
APPENDIX
informal code style
emphasis on speed of coding
ADA: rigorous type checking
no default assumptions ??” full declarations required
documentation/comments required
emphasis on correct and verifiable process
1.
Pages:
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496