After reading the instructions for Assignment 1, I see that it will involve some hardcore recursion. I felt it would be a smart idea to go and further my understanding of the concept, by working some exercises on CodeAcademy before I try to solve a 4 stool version of Tower of Hanoi recursively.
I also learned from Professor Danny, this week that Python has a built-in module called Turtle that draws simple line graphics that can be manipulated on a set plane depending on what direction you’d like the Turtle object to point. We can also get fancy and all by changing the color of the Turtle or be mean and hide its tail, haha! I like the Turtle class as I feel like it was designed solely for teaching recursion.
The recursion allowed us to pick an arbitrary number of lines we wanted… for i in range(n): and draw that number of lines recursively and from each point of the previous recursion it bursts out 3 times.
But after class I decided to and mess with the program and spice it up a little bit. I added a few new features 2 more colors to the list, I changed the range to 5 and the position of the plane that the bursts happen. And voila I get this beauty down below. ^_^
That is all for this week folks, stay humble!
yours truly, – “CodeShark”