Snap Projects, March 8, 2012, Cardinal Forest Elementary School

Snap website
Snap is available online - about Snap.

back to more Snap! projects

    Lists in Snap!

  1. Make a new variable called "mylist"

  2. Set your list variable to an empty list:

  3. An empty list is made with the list block:

  4. Use a repeat block to put ten random numbers in your list.

    Use random numbers between 1 and 100:

  5. Click on the blocks and see the list created:

  6. Now print out each number in the list. Use a counter variable called "i":

  7. Set "i" to 1.

    The counter variable "i" starts on 1.

  8. Go through the list using a repeat block, it runs for the length of the list

    Repeat "length of list" times

  9. Say each item i of mylist for 2 seconds.

  10. Change the counter "i" by 1 to go to the next number in the list:

  11. Read the blocks, can you understand how this works?

  12. Run the blocks

  13. Now try to put the word "dinosaur" into a list of letters: