Hey guys,
I haven't posted on here for a while because I have been quite busy with my other courses. However, I finally found the time to make a post.
Week 5 we looked at linked lists. I found them easy to understand, however I had a difficult time coding linked lists. Whenever I asked someone for help with coding them, they would just give me an explanation of what I already understood, but I guess I could not transfer what I understood into code that other people could understand and that would actually work. So what I did was(like always) I spoke to my upper year friend, and he helped me understand how to code linked lists. The part I found difficult coding was the last two lines here:
def __setitem__(self, index, value):
"""
Set the value of list at position index to value.
Assume self has size at least index + 1.
@param LinkedList self: this LinkedList
@param index int: position of list to change
@param object value: new value for linked list
@rtype: None
"""
while index < 0 and self.size != 0:
index += self.size
new_node = LinkedListNode(value)
if index >= self.size:
raise IndexError("index too big!!!")
elif self.size == 1 and self.front == self.back:
self.front = self.back = new_node
else:
current_node = self.front
while index > 1:
current_node = current_node.next_
index -= 1
new_node.next_ = current_node.next_.next_
current_node.next_ = new_node
-Anthony Arena
Sunday, February 28, 2016
Tuesday, February 2, 2016
Week 4 SLOG
Hey guys,
One week after my first SLOG, I feel as if my understanding of the material has improved greatly. I think I just had a difficult time jumping from self studying at my own pace to keeping up with the speed of my prof. To be honest, I haven't been learning very much from lecture, but I believe it may be because I have the Thursday night 6-9pm lecture, I find it difficult to pay attention for such a long period of time. I have been learning the material of the course from doing the labs early and by myself and using online resources.
Although I am a Physics and Mathematics student, CSC148 has somehow become my favorite course. I enjoy learning the material and doing the labs in my spare time and I am considering a minor in Computer Science now. Now, onto the material we have learned and my opinions on it:
One week after my first SLOG, I feel as if my understanding of the material has improved greatly. I think I just had a difficult time jumping from self studying at my own pace to keeping up with the speed of my prof. To be honest, I haven't been learning very much from lecture, but I believe it may be because I have the Thursday night 6-9pm lecture, I find it difficult to pay attention for such a long period of time. I have been learning the material of the course from doing the labs early and by myself and using online resources.
Although I am a Physics and Mathematics student, CSC148 has somehow become my favorite course. I enjoy learning the material and doing the labs in my spare time and I am considering a minor in Computer Science now. Now, onto the material we have learned and my opinions on it:
Queues & Stacks
I found Queues & Stacks fairly easy to comprehend and the lab on them was really easy. I believe what I have learned from queues & stacks and the lab on them will be quite important for completing Assignment #1. Not much else to say regarding this.
-Anthony Arena
Subscribe to:
Posts (Atom)