Upcoming SlideShare
×

# Htdp01

177
-1

Published on

Published in: Technology, Travel
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
177
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
0
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• (deﬁne (area-of-disk r) (* 3.14 (* r r)))• (deﬁne (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• (deﬁne (Fahrenheit->Celsius t) (* (- t 32) (/ 5 9)))• convert.ss (teachpack)• (convert-gui Fahrenheit->Celsius)
9. 9. 2.4• - (deﬁne (P x) (+ (x) 10))• - (deﬁne (f n) (+ (/ n 3) 2)) - (f 5 8)
10. 10. 2.5•••••
11. 11. 3 +• . (Divide And Conquer)
12. 12. • .• !!!
13. 13. 3.2• (deﬁne PI 3.14)• (deﬁne 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. (deﬁne (is-5? n) Is 5 ? (= n 5)) (deﬁne (is-between-5-6? n) (5, 6) (and (< 5 n) (< n 6)))(5, 6) or (deﬁne (is-between-5-6-or-over-10? n)over 10? (or (is-between-5-6? n) (>= n 10)))
18. 18. • .( )• .