2014年2月22日土曜日

Week 5 
Recursive continued
 In this week, professor explained us more recursions and gave us hints of Assignment 1. The concept of A1 is based on Tower of Hanoi, it is an interesting topic of mathematics. He provided us a function that shows moves of n cheeses from stoo1 to stool 3, meaning , and it was really helpful for me because that function included recursion and I utilized the function in A1!.


And he taught us name and value this week. Every name contains a value(object) in python and value is a reference to the address of an object. And there are different types of scopes in the function body. Innermost scope is local, enclosing scopes are nonlocal, and the largest scope is global. During the lecture, we practiced to find the names in different scopes.

In this week, I spent most time in A1. I utilized the technique which the professor taught us during the lecture to complete the Tower of Hanoi of four stools.

0 件のコメント:

コメントを投稿