Thursday, 29 November 2012

Week 1-Start with DrRocket


File:Racket logo.pngMy computer studies started with a short introduction of computer history and a programming language-DrRocket. DrRocket is designed for different people regards to their experiences with computer language, and it has language for beginning student, intermediate student and advanced student. As a student who is not really familiar with programming, I am using intermediate student with lambda.

To deal with pictures, (require picturing-programs) should always be written in the first line. Below are many functions that can be used in terms of manipulating images:
(flip-vertical im)
(flip-horizontal im)
(rotate 180 im)
(rotate-cw im)
(rotate-ccw im)
(scale 3 im)
(scale/xy 3 1/3  im)
(image-width im)
(image-height im)
(crop-top im 100)
(crop-left im 100 )
(beside im1 im2)
(above im1 im2)
(overlay im1 im2)

I also learned about how to build a image: (circle size “solid” “color”)
In addition, there are other functions that related with numbers and strings:
(quotation 5 3)
(reminder 5 3)
(+ ½ ¾ 1 4 7)
(/ 1 6 3/5 3 6)
(round e)
(floor e)
(inexact->exact #i3.0)
(numerator -2.55)
(denominator -2.55)
(string-length “2245778”)
(string-append “all” “together”)
(substring “123567” 3 6)

No comments:

Post a Comment