If I were data modeled by a computer, there would be variables which describe me including one to reference my name (a value which hasn’t changed) and my age (a value which does change every year). Some variables could only be determined by me, such as the name of my favorite movie, and others might be controlled in whole or in part by external sources, such as my marital status. All of these kinds of relationships can be modeled in code when you know the right vocabulary. In this lesson, we will create a class which implements the example I just provided, and then we will use our understanding of variables to animate an example solar system, all with a single easy script. Continue reading
Beginner
Your First Script
If you’ve never created a script before, don’t worry, it’s not exactly rocket science. Learning to program is like learning a new language, but you are “talking” to the computer. Just like a human language can be broken down into sentences which consist of a noun and a verb, programming languages can be broken down into variables (the noun) and methods (the verb) which are often paired in statements (the sentence). Learning to program simply requires a bit of effort to learn the vocabulary and then to put it all together in a logical way. Continue reading