This week, we continued studying on the topic of class. I learned the difference between "Stack" and "Sack". Basically, Stack is to append something into a list and remove the last item out. In contrast, Sack is to insert or remove an item randomly from a list. When implementing class Sack, the professor introduced us a new method called random module in which we can pick and return a random item from a list by using randint function.
I found a difficulty when I was doing Lab 3 this week. Some contents are from CSC108 that I can't quite remember. Therefore, I need to pick a time to review all the stuff I left out from last semester. By the way, the first exam is coming up. I feel less confident about this exam. Unlike CSC108, CSC148 does not provide tutorial videos which is an useful way to review. Also, the exams from previous year have not posted yet that I can't work on those materials earlier. Anyway, I will work hard during the weekend to get fully prepared for the test next week.
Friday, February 5, 2016
Wednesday, January 27, 2016
SLOG #1
In the past two weeks, we were concentrated on the topic of designing and implementing a class. It is not a fresh topic to me since a number of contents have already covered in last semester and I am able to write some basic codes. What I found interesting about class is the special usage it has. From my initial perspective, the purpose of creating and implementing a class is to deal with data. However, it can be used for drawing graphs as well. In the class, the teacher presented us the method to draw a square and a right-angle triangle that is deeply attracted me. I am also confronted with a small challenge about the format of writing functions especially the type contract. It is a bit differ from what I learned in the last semester and sometimes I am confused. Whereas, I will do more practice to get familiar with the new expression format. In this course, I aim to fully understand all the contents covered so far. In short, I should be capable of designing and implementing a class on any topics.
Subscribe to:
Posts (Atom)