Htdp01

177
-1

Published on

Published in: Technology, Travel
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
177
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Htdp01

    1. 1. How To Design Programs
    2. 2. ••••
    3. 3. ••••
    4. 4. •• (generative recusion)• (accumulation)• (history sensitivity)
    5. 5. Scheme•••• .
    6. 6. 2 , ,•• (+ 5 5), (- 5 5), (* 3 4), (/ 8 12)• (* (+ 2 2) (/ (* (+ 3 5) (/ 30 10)) 2))
    7. 7. • = 3.14 * r^2• (define (area-of-disk r) (* 3.14 (* r r)))• (define (area-of-ring outer inner) (- (area-of-disk outer) (area-of-disk inner)))• (area-of-ring 5 3)
    8. 8. 2.2.1• [C]=([F]-32)*5/9• (define (Fahrenheit->Celsius t) (* (- t 32) (/ 5 9)))• convert.ss (teachpack)• (convert-gui Fahrenheit->Celsius)
    9. 9. 2.4• - (define (P x) (+ (x) 10))• - (define (f n) (+ (/ n 3) 2)) - (f 5 8)
    10. 10. 2.5•••••
    11. 11. 3 +• . (Divide And Conquer)
    12. 12. • .• !!!
    13. 13. 3.2• (define PI 3.14)• (define PI 3.14159)
    14. 14. • .
    15. 15. 4 . x=y (= x y) x<y (< x y) x>y (> x y)
    16. 16. (and (= x y) (< y z))(or (= x y) (< y z)) (not (= x y)) true, false
    17. 17. (define (is-5? n) Is 5 ? (= n 5)) (define (is-between-5-6? n) (5, 6) (and (< 5 n) (< n 6)))(5, 6) or (define (is-between-5-6-or-over-10? n)over 10? (or (is-between-5-6? n) (>= n 10)))
    18. 18. • .( )• .

    ×