Thursday, 6 February 2014

SLOG Entry#3

     Here's another SLOG entry. This week, we talked about the Tower of Hanoi, and learned about scopes and namespaces. The Tower of Hanoi is a classical math puzzle that entails moving a stack of disks from one spot to another, one disk at a time. This is a puzzle as bigger disks can't be placed on top of smaller disks. We discussed this classical problem as we must do something similar for Assignment #1. We also talked about scopes. When values are created and referenced to memory addresses, they exist locally, non-locally, or globally. Depending on where the variable is created, it can be overwritten by another variable with the same name, but in a more focused scope. An interesting tidbit, which can be avoided by just giving the variables different name in the first place. That's all for this week. Tune in next week for more computer science!

No comments:

Post a Comment