博文

目前显示的是 十月, 2017的博文

Oct 27th blog

        It has been more than one month since I first got into this course. In this past month, I did several quizzes and a term test. In order to prepare for these quizzes, I went through all the lectures notes that were posted on the CSC104 website and did the practice. The practices were extremely helpful because they were the same types of questions that we were asked in the quizzes, and I did pretty well on the quizzes. Talking about preparing for the tests, I did several past tests that the teacher posted on the website. The past tests perfectly introduced the way the layout of the tests. The past tests covered all the details that we were taught, and well prepared me for the tests.        Through using "beside, above, overlay" and functions "100 triangle "outline" black", "100 square "outline" "black"" to create a picture of a house. This was the first time of me using DrRacket to create a picture, and I was proud of

THIRD WEEK

Another week has passed, during this week of learning in csc104, we got to learn something new, which was condition. Our professor had explained the steps of how it worked quite clear in class, for example, we first define a function (define (f n ) (or (zero? n) (and positive? n) (f (- n 2))))), then we sub in a number for n, (step (f -1)). The function would run as (or (zero? -1) (and positive? -1) (f (- -1 2))))) because 1 does not equal to zero, the first statement would become #false (or #false (and positive? -1) (f (- -1 2))))) because -1 is not positive, (or #false (and #false (f (- -1 2))))) since there’s a #false in the “and” bracket, the whole thing would become false (or #false #false) #false This week’s lesson wasn’t too hard, I prepared for the quiz through doing some practices that were posed on the CSC104 website, they were quite helpful.

Oct 12th preparing for term test

In this week, we don't have any lecture because of the Thanksgiving Day on Monday and the term test on Friday. So instead of learning new staffs, I reviewed the codes we learned before. During my review, I found the "check-expect" and "boolean" most confusing, because, for "boolean", we expected a "#True" or "False" output. While "check-expect" was checking whether the two parts of the body were identical. After few times of practicing with the past tests and exercises, I got more familiar with these two functions. The other code that I got confused with was the rotate degree. When I typed in "rotate 45 an-image", I was expecting to see the image to rotate 45 degrees clockwise. But what I got was the image rotating 45 degrees counter-clockwise. By trying this code sever times on DrRacket, I figured out that it was the rule that rotates a certain amount of degrees was assumed as rotating counter-clockwise certain

First CSC104 blog

Before going into my first year of university life, some of my friends that studied at UofT told me about CSC104. They told me about how interesting CSC104 was and how doing CSC104's practice gave them a chance to learn something cool and useful. And now, here I am, taking CSC104 for my first year of university. Through this course, I really hope to get to know more about coding, and actually be familiar with it. For example, creating my own games using codes, and drawing a fantasy picture using codes. Throwing back to the first time that I programmed was when I was in Grade 11.  I did a computer science course for a semester. But instead of programming using DrRacket, we used Java, which I found somewhat similar to DrRacket. There are still differences. The several differences that I found were that, when using Java, if I just typed in a word, like "morning", there would be an error. While using DrRacket, I typed in "morning" and hit enter, the word "mo