Free Grow A Garden Coding Activity


In this free coding activity, you’ll create a game to grow your own flower garden in Scratch by making sure your flowers have plenty of water.

Let’s get started!

 1. Go to the Scratch website

 2. If you already have a Scratch account, click ‘Sign in’ and enter your login details, otherwise click ‘Join Scratch’ and create your free Scratch account.

 3. Open this starter file: https://scratch.mit.edu/projects/691521887/

Once you have opened the starter file, click the “Remix” button to make your own copy.

Time to create your animation!

4. Start by adding this code to the “Watering Can” sprite. This code means that any time you move the mouse side to side, the sprite will follow.

5. Next, we want the water to always be in the watering can, so add this code to the “Water” sprite.

6. Now that the water is in the can, we want to be able to pour it by clicking the mouse button. Add this code to the watering can first:

Then, add this code to the water sprite:

Don’t forget to test it out by clicking the Green Flag! Can you move the watering can back and forth by moving the mouse? Can you click to drop some water?

7. Now it’s time to grow your garden! Start by adding this code to make lots of flowers appear. Make sure you’ve added it to your “Flowers” sprite. This code will make copies of the sprite and move them to random places in the garden.

8. Press the green flag - do you see lots of flowers appearing? There should be a new flower every 3 seconds.

9. Finally, let’s add some code to check if the flower got some water. If it did, then our code will make it grow! Add this code on the “Flower” sprite.

10. Time to grow your garden! Press the Green Flag and try watering your flowers, then watch them grow. Have fun!

Share it!

14. Now it’s time to share your creation. Click the orange ‘Share’ button at the top of the screen.

The ‘Share’ button will only be visible if you have verified your email with Scratch. If you can’t see the button, click on your profile name in the top right corner, select ‘Profile’  and follow the instructions in the orange banner at the top of the screen to verify your email.

15. Click the ‘Copy Link’ button.

You can share that link with friends and family by email or text message and they’ll be able to play your game.

THANK YOU for creating this fun animation with us! 

Previous
Previous

Coding for Kids: Reasons why every parent should encourage their child to learn code.

Next
Next

Tackling the Gender Imbalance in STEM