Saturday, January 21, 2012

Explore different ways to do the same thing

As a programmer you should always look for other, better ways to solve problems.  Even if you are presented with a possible way to solve a problem, there may still be better ways to do the same thing!

Say for instance you want to resize the sprite in Scratch.  You can use the buttons at the top to do so by click on the button and repeatedly clicking on the sprite:
You can also use the code block "set size" in a "When green flag clicked" event 

Or you can use the code block "change size" in the program or even in a loop until the size meets your requirements

Or you can right click on the sprite and use resize sprite to drag and resize

No comments:

Post a Comment