This code is split into two sections. The main program is on the left and a procedure on the right.
The sprite costumes are on the right of the screen.
Think carefully about each part of the program and what it will do.
Write down what you think it will produce when the Green Flag is clicked
You can run the program by visiting this link on Scratch
Thinking about the Pattern procedure,…
- Which group of instructions are responsible for placing the red spots?
Circle them on the code.
- Which instruction decides how many red spots are in each pattern?
Write it here.
- Why is the forward 45 instruction needed?
Write it here.
- Why does it turn 90 degrees?
Write your thoughts here
- Which group of instructions are responsible for placing the black spots?
- Why does it only turn 45 degrees and just move 25 before stamping?
Write your ideas here.
- What would be a better name for the Pattern procedure?
Write down your idea
Thinking about the Main Program…
- How many of the patterns are drawn by the main program?
- Which instruction decides where they will be drawn?
- Describe in your own words what the call pattern command does.
- What do you think the purpose of the turn 15 instruction is?
Write your thoughts here.
These tasks allow you to investigate the program further. It is advisable to remix the project so that you can save your edits.
- Change the name of the Procedure to something more appropriate
What did you change? Write it down.
- Change the pattern so that it has 5 equally spaced red spots.
Write down a list of instructions you changed.
- Add an instruction to the start of the procedure which says “Set size to 15%”
Use instructions like the one below to replace the distances moved in each forward statement.
Write down what you changed.
- Experiment with changing the percentage size.
What do you think is the smallest or largest number which works well?
- Change the “Set size to 15%” command, to use a random size between the numbers you chose in the last question.
Try some of these coding challenges
- Make a wreath by making poppies appear all the same size in a circle.
- Make a row of 5 poppies appear along the bottom of the screen
- Make 2 more rows appear above the rows at the bottom.
- Make the size of the poppies be related to the y position (coordinate)
5. Make a field of poppies where those at the bottom which appear closer are larger, and those further away are smaller.