Time for action - draw a graph
We want to graph each day and newAmount pair in our calculation. To help accomplish this task, we'll add a broadcast block to the end of the forever if block.
- With the double sprite selected, add a broadcast block as the last block in the forever if block. Add a second broadcast block before the forever if block starts so that we make sure we graph day 1.
- Create a new broadcast message named graph, and select it in both broadcast blocks.
- For every broadcast we send, we need to program something to receive it. From the Control palette, add a when I receive block to the double sprite. Make sure graph is set in the drop-down menu.
- In our graph, days will be represented by an x value and the newAmount will be represented ...