This week we talked about the haunting Assignment and
Scopes. I have learnt C++ before and I was clear about scopes. Knowing the
scopes of your variables in your program is very important, especially in
languages like C++ and Java. The new thing I learnt this week was how to use
variables with same names, one defined locally and other globally using the
‘nonlocal’ and ‘global’ keywords. I haven’t come across any of its application
until now, but I feel it would be important in the future.
The Assignment was much harder than the once we had in
CSC108. It was really fun doing the assignment. The most challenging part, I
think was completing Tour.py. It also helped me strengthen my understanding of
recursion. The biggest thing I learnt from this assignment was to always read
the handout very carefully, because I only skimmed through it and has to do a
lot of unnecessary extra work.
No comments:
Post a Comment