Friday, January 30, 2015

CSC 148 SLOG FOR WEEK 4

The recursion concept is interesting.

You are calling a function inside the same function.

It is analogous to the word recur's actual denotation (repeat again). Also, the "repetition" breaks a huge problem into many small steps. Each mini step is very similar.

I also learned that you can write for loops like this:

Suppose A = [1,2,3,...,a-2, a-1,a] for some natural number a.

sum (all_a) for all_a in A.

Zhiyuan Zhang

No comments:

Post a Comment