Unit 4

START DATE:DUE DATE:STATUS:Open

Overview of Unit

Unit 4  Programming Part 2 

  • Conditionals, boolean logic, intro to functions


Task


Learning Objectives

UNIT 4: Programming in P5.js Part 2 - 13 Classes

This unit focuses mostly on conditional statements and boolean logic with some introduction to functions (aka procedures).  

Experienced teachers will likely question why these materials do not include work with FOR and WHILE loops.  This is a legitimate critique and I often do work with them for a day or two in Year 1.  However, as the DRAW function in P5.js is a looping function, I have decided to focus my students on using the loop rather than writing their own.  FOR loops and WHILE loops then become a major component towards the end of the course and for the AP CSP exam, students should be familiar with the unusual syntax used for loops on the exam.


UNIT 4 SETUP Notes

For the first unit of Programming in P5.js, I primarily used the https://editor.p5js.org/ for all our code.  For the second unit, I switched to using replit.com.

Starter code for Examples 1-3 of the second unit was provided for them in a full working project. Some images were also provided with the starter project. The complete starter file is available through our resources and is called Unit 4 STARTER PROJECT

Students interacted with an index.html file that would add to each day in such a way as to direct to the most recent javascript files.  The first two examples below are the HTML file  (end of unit) and the CSS file that governs the styles used.



Unit Quick Links


Continue to Unit 5 »