Today is our last lecture for CSC104. :(
All people got their test 2 back. Professor told us the result of test 2 was no better than test 1 and so we have a bell curve.
Our quiz for this week is about using recursion to create shapes (the function I mentiond in week 11 journal).
Wednesday, November 28, 2012
Wednesday, November 21, 2012
Week 11 Joural
In today's lecture, professor used DrrRacket to make snowflake and some other fun patterns.
Today's course is all about recursion.
Here is a function, koch is make the one thrid of a snowflake
The result for (koch 1) is
_/\_
The result of this progam will form a complete snowflake by putting three "koches" (three 1/3 of a snowflake) together like a triangle.
Today's course is all about recursion.
Here is a function, koch is make the one thrid of a snowflake
(define (koch d)
(cond
[(zero? d) (line 5 0 "blue")]
[else
(beside/align
"bottom"
(koch (sub1 d))
(rotate 60 (koch (sub1 d)))
(rotate -60 (koch (sub1 d)))
(koch (sub1 d)))])
(cond
[(zero? d) (line 5 0 "blue")]
[else
(beside/align
"bottom"
(koch (sub1 d))
(rotate 60 (koch (sub1 d)))
(rotate -60 (koch (sub1 d)))
(koch (sub1 d)))])
The result for (koch 0) is
_
_
The result for (koch 1) is
_/\_
Moreover, professor showed us another program, caleld "koch-snowflake
(define (koch-snowflake d)
(above
(beside
(rotate 60 (koch d))
(rotate -60 (koch d)))
(rotate 180 (koch d))))
(above
(beside
(rotate 60 (koch d))
(rotate -60 (koch d)))
(rotate 180 (koch d))))
The result of this progam will form a complete snowflake by putting three "koches" (three 1/3 of a snowflake) together like a triangle.
Wednesday, November 14, 2012
Week 10 Journal
Today is our term test 2 day ~ To be honest, I did not reviewed alot for this test, but I've done my best.
The test was divided half of hardware questions and progrming questions.
The test was divided half of hardware questions and progrming questions.
Wednesday, November 7, 2012
Week 9 Journal
In this week's journl, I would like to use the Wikipedia project as an example of problem solving, and I will use the Poly method.
1. Understanding the problem. (Recognizing what is asked for.)
This project asks us to find a wiki article that in need for improvements.
Firstly, I registered an account as a contributor, then I started to look at the articles pages in the help center.
I end up choosing "Conghua" as my topic. http://en.wikipedia.org/wiki/Conghua
This articles need improvment on the citation.
2. Devising a plan. (Responding to what is asked for.)
I will start by researching the topic in the english and chinese websites (because the topic is about a city in China) to find any relevant websites.
Afterward, I will learne how to insert a citation into the article through help center website
http://en.wikipedia.org/wiki/Help:Contents.
3. Carrying out the plan. (Developing the result of the response.)
I found the following websites are useful:
http://www.gd.gov.cn/
http://www.guangzhoutravelguide.com/about_guangzhou/conghua-district.html
I insered these websites into the article:
http://en.wikipedia.org/wiki/Conghua
4. Looking back. (Checking. What does the result tell me? )
I went back to check if other contributor change my works, and I find out my works are still there which means my changes are reognized and approved.
1. Understanding the problem. (Recognizing what is asked for.)
This project asks us to find a wiki article that in need for improvements.
Firstly, I registered an account as a contributor, then I started to look at the articles pages in the help center.
I end up choosing "Conghua" as my topic. http://en.wikipedia.org/wiki/Conghua
This articles need improvment on the citation.
2. Devising a plan. (Responding to what is asked for.)
I will start by researching the topic in the english and chinese websites (because the topic is about a city in China) to find any relevant websites.
Afterward, I will learne how to insert a citation into the article through help center website
http://en.wikipedia.org/wiki/Help:Contents.
3. Carrying out the plan. (Developing the result of the response.)
I found the following websites are useful:
http://www.gd.gov.cn/
http://www.guangzhoutravelguide.com/about_guangzhou/conghua-district.html
I insered these websites into the article:
http://en.wikipedia.org/wiki/Conghua
4. Looking back. (Checking. What does the result tell me? )
I went back to check if other contributor change my works, and I find out my works are still there which means my changes are reognized and approved.
Subscribe to:
Posts (Atom)