3.4 Lesson Implementation
Welcome (5 min)
After welcoming the students and addressing anything that needed to be brought up prior to the lesson, I would ask everyone to create a new html index file and a new javascript file just as we did in 2.5 - Using p5.js. As this is likely the third program we would be working on, I would suggest to students that they use the following file names:
As always, encourage students to save their files in an appropriate location. I strongly encourage the use of peer supports if students forget how to create and save new files.
- 1.3_index.html
- 1.3_your_last_name.js
As always, encourage students to save their files in an appropriate location. I strongly encourage the use of peer supports if students forget how to create and save new files.
Introduce Variables (5 min)
In the video below I give an introduction to variables as I might if I were teaching a class of Grade 9 students. The pace and tone of the presentation might vary depending on which age group I was presenting to and their level of experience.
|
Exploring Variables (15 min)
Variables are fairly easy to create and students should not have too much difficulty in getting started. I would leave my example code up on the board or presentation screen for students to copy if they need to. Once a student has their program working in a similar manner to the demonstration, I would encourage them to explore and experiment with their variables. A few suggested prompts are:
|
Introduce IF Statements (10 min)
|
|
Animation Challenge (20 min)
After students have their ellipse moving like in the demonstration, I would encourage them to play around with IF statements. Sometimes it is helpful to give students a 'goal' to work towards and so I might display the two animations shown below. As they work on their code, students might successfully emulate the challenges or they might discover new ways of using IF statements to achieve interesting effects. One note I must add is that I would not show them the code for the animations displayed below; students need to determine how to achieve these results through experimentation either on their own or with support.
Wrap Up & Reminder to Save (5 min)
As always, remind students to save their work in an appropriate location. Students often forget or simply don't save if I give this reminder after the bell has gone or the period is over. Therefore, I like to dedicate the last few minutes to saving projects and storing them in the correct location. This is certainly worth the time investment because failing to do so may result in a prolonged start to the next class with many students missing their work from the previous day.
Feel free to download this lesson outline as a Word document by clicking this link.