The easiest way to learn to code is to examine an existing program (lines of code are compiled into a program) that someone else wrote and start mashing and bashing it in order to see what the effect is. Students at St. Raymond are introduced to code with this learning approach. An analogy would be to learn how a car engine works by removing or modifying interesting looking parts we don't know the function of to see how the car reacts when we try to drive it again. St. Raymond students take this same approach when they start learning coding.
Your Instructions: Make your own changes to some code by typing in the window below. Start by changing the number next to the word "lt" on the last line from a "5" into a "50". Then click the grey triangle "play" symbol to the right of the yellow, blue and green icon. See what happens. Now, change something else. Just be methodical about what you are changing. Make one small change at a time and witness the results. When something does not work you can go back a step to what you know did work. With every change you are learning more about how each line of code works together to make the drawing you see in the window to the right of the code.
We use a wonderful tool called Trinket.IO at St. Raymond so students can share their own work so a student's family and friends can mash n' bash code examples written by the student. The coolest thing is that the original work remains for the student, while each and every friend or family member is actually making their own iteration of the original work.