This
week we still stick on the topic of recursion, on Monday we tried to trace some
recursions by hand which helped me to understand the process how haoni works
even though i haven't look at the assignment yet. I have a pretty good idea on
how the recursion works, yet I am still confused about how to write the
recursion statements in a line of return. I tried hard during the lab yet I
still cannot get a solution based on a line doing it, I end up with a for loop
which we did in 108, much easier >.<. For the staff we learned on
Wednesday, I found it hard to trace and I did poorly on understanding the
'global' and 'nonlocal' thing. I have no idea why the result changes from 'test
spam' to "nonlocal
spam" even though several people explained to me, I still cannot understand it. I believe the reason why I cannot understand it is because I did not fully understand recursion. I will go up to the website of python and read the docs to make sure I understand it. Then, I will try to finish my A1 as soon as possible cause there is not much time left. The Haoni thing is really fun though, which seems random yet involves a lot of math and sequences.
No comments:
Post a Comment