I hate early morning classes. I have 9a.m. classes every day from Monday to Friday and it just takes so much effort for me to get up for them. I guess it's my own fault for not sleeping earlier but I'm much more of a night-time person than a morning one. Falling asleep in class has been a habit of mine for the past four years at university (*sigh*); well I've already failed my 2013 New Year's resolution! Hahaha...
On another note, the programming language that we're using in CSC104 - Dr. Racket - is pretty simple and straightforward. It also allows you to copy and paste pictures as part of the code compared to some other programming languages like Python. For instance, if you want to put a picture of a penguin beside the vertically flipped version of the same picture, all you have to do is type the following into Dr. Racket:
> (require picturing-programs)
> (beside *paste picture of penguin* (flip-vertical *paste picture of penguin*))
Like other programming languages, make sure to keep track of all the parentheses. Putting a parenthesis in the wrong spot will lead to an error and adding one too many will also lead to an error. Last week's tutorial quiz was super easy; we just had to give the output of certain Dr. Racket input codes. For example, what do you think the output of the following would be?
> (+ 1 2 3)
I'm feeling pretty tired at the moment so I think I'm going to take a nap before my next class. Peace out!
p.s. The answer's 6.
I always forget parentheses too :P Fortunately we can check it by click the "run" button. It helps a lot!
ReplyDeleteHaha yea. You have no idea how many times I missed or added an extra parenthesis! Hope the course went well for you!
Delete