This week we covered name spaces/scopes.
There are several scopes of name spaces.
Built-in: always present
Global: names in current module of __main__, so likely will be present until the interpreter closes.
Non-local: basically any name used within a function that isn't local to that function.
Local: found in function bodies, will be lost when that function terminates.
Assignment one was easy enough up until part 5, where my brain decided it had had enough and neglected to point the obvious answer. After completing the recursive part of step 5 the rest of the assignment was once again easy and I finished fairly quickly.
Also, pep8 insists on making my code look bad. Sad face.
No comments:
Post a Comment