Year 8 are moving from block coding to a text-based language. The teacher shows how p5.js places shapes on a 400 by 400 canvas, with the origin at the top left and y counting downwards, and demonstrates rect(), ellipse(), line() and fill(). Each student sketches their own robot on the squared page of their book, labels the coordinates of every part, then types the commands into the p5.js web editor, runs the sketch and corrects any part that lands in the wrong place or is hidden behind a shape drawn later. They work without signing in, copy the finished code into a text file in the class folder, and annotate a printed screenshot in their book to show which line of code draws which part. Until this year the department taught the same lesson with Python's turtle module in IDLE, using the same kind of grid plan (with the origin in the centre and y counting upwards) and the same run-and-fix cycle.
This page is one of a growing set of PICRAT examples by cell, subject and grade. Page maintained by Andy Perryer.