Friday, November 1, 2019

Playgrounds Day 3




1. In the Loop Jumper puzzle, the character made 30 moves, but I only wrote 6 commands, using a loop function

2. You should create a function every time there is a repeatable action that you could condense into a command. You should use loops if there is a function that can be successfully repeated many times. It is a subjective decision whether to use a function or a loop, but it is more efficient to use a function or loop rather than nothing.

3. I would like to create 2 functions; one function to turn around, and a function to walk 2 steps. I would like to create both of these simply because it would make the coding process much quicker.

4. Some everyday "functions" in life are; brushing your teeth, tying shoes and walking. Walking is made up of; moving your legs, changing your center of balance, adjusting your feet for a good foot placement, and many other things. Since we don't have to think about every step, just the "action", this is a function. Almost every action in our life that uses Muscle Memory is a function. Learning to do something would be like writing the commands in the function and then doing it after you have learned it would be like running the function.

5. I have created shortcuts in my life to make things easier often. For example, in my closet, I place my shoes so that the left shoe is on the left, and the right shoe is on the right. I would consider this a function because I do it unconsciously, and it has become automatic.

No comments:

Post a Comment