Wednesday, October 24, 2012

Week 7 Journal

Here comes my first journal!
       Firstly, I would like to talk about last week's lecture. In last week's lecture (October 24th), professor continued doing  improvements on the barracuda clock we did on the third week lecture. Professor  put the basic functions we leaned in week three and added some new funcion to the big bang model. When I first work on the qustions in the pdf textbok, I felt a bit struggled. But I had overcome the difficulty eventually by asking my friends and theTAs during tutorial. Moreover, I would like to share the following example to you guys. This DrRacket code will create a blue square with side width 10 on a 100 by 100 window size, and the square is  getting larger by the second.
; square-of-width : number -> image

(check-expect (square-of-width 10)
                       (square 10 "solid" "blue"))

(define square-of-width (square n "solid" "red"))

(big bang 10
       (check-with number?)
       (on-draw square-of-width 100 100)
       (on-tick add1 1))

No comments:

Post a Comment