Using Blocks within Blocks

You can treat your custom-made blocks like any other block in snap, including using them within other blocks you define. You may have already done that at least once if you wrote the house block.

flower with 6 square petals
  1. Use the empty square () block to create a block 360 divided by the number of petals that will draw a flower with square petals, like the one shown here, but with any specified number of square-shaped petals of the specified size. Calling block: draw a flower with 6 petals of size 50 should draw the example picture shown here.
  2. Talk with Another PairAfter you've worked on this for a bit, take a moment to look at what others have done. If you see something you like, think how you could use that idea in your program.
  3. Now, draw a field of flowers and give each flower a different color, size, shape, position, and so forth.

    1. Use some of the simple custom blocks you've already written, and write new custom blocks that make use of those simpler blocks to do complicated things.
    2. Use repeat block to draw lots of flowers.
    3. Use pick random block to make the flowers interesting and different.