Animation, Interaction and Variables
Today I learned about variables, which are like little boxes in your code that store information. Use different names for your variables or you will over-write your earlier variables. Give your variables names that let someone else know what it is for. You can use variables and the draw function (see below) to animate your programs. There are also shorter forms of some types of code to save time (see below.) You can also include code to make the program respond to what the mouse is doing, allowing for user interaction. A number of maths expressions were using in this section including: + (add); - (take-away); * (multiply); / (divide); % (divide and give remainder.) You can use these maths expressions to keep all elements of your objects constant with each other using fractions (see below.) See the projects that I worked on during these sections: Project: Shooting Star and Project: Animal Attack!
![A table of programming commands.](https://static.wixstatic.com/media/b86045_399acdeeb7764f5cb47b91e496048a25~mv2.png/v1/fill/w_600,h_648,al_c,q_90,enc_auto/b86045_399acdeeb7764f5cb47b91e496048a25~mv2.png)