Please enable JavaScript to use CodeHS

  • Featured

Gardening 101

In this project, students will use event and animation techniques to create an animation of a plant growing through various stages of development.

Medium

3 Hours

High School

Project Description

Background

Like many things in life, plants go through various stages of growth over time. They may start as a seed, germinate and send out their first stem, grow taller and start producing leaves, produce flowers / fruits / vegetables, etc.

Your Task

In this project, you are going to use CodeHS graphics to animate a few stages of plant growth. With a timer, you’ll be able to keep track of “time” passing and use that information to move through different parts of a plant’s development.

In the demo below (click to plant a seed), you can see three distinct stages:

  1. The seed is planted and changes size
  2. A stem starts to grow upward with random leaves
  3. A flower blooms.

If you’ve learned about arrays and objects, you’ll be able to create a super bloom, where multiple plants can grow with multiple user clicks.

Project Demo

Explore this program before assigning it!