# Number patterns and sets!

By George Gadanidis & Chris Yiu. With development, research and outreach support from ORF-RE and SSHRC.

Create math patterns (click on Run Code). Edit the code to create new patterns. Get an old tutorial (soon to be updated).

 BEAUTIFUL NUMBERS Numbers are beautiful. Especially on a grid. Use code to select and decorate sets of numbers based on their properties. SAVE & SHARE Click on Save Code and name your project. The URL that appears under the Project Name can be shared. PUZZLE 1 Click on Example #1. Notice that the conditional statement if-do determines which numbers are decorated. Change values and click Run Code to see the effect. For example, change Repeat number or Gork colour. What do you think number mod 3 = 0 means? Edit the code to get this pattern. PUZZLE 2 Click on Example #2. Notice that the conditional statement if-do-else. Edit the code to get this pattern: PUZZLE 3 Click on Example #3. What does the conditional code if ___ and ___ do? Edit the code to get this pattern. MORE PUZZLES Click on New Puzzle. Study the pattern of circled numbers. Can you create code that decorates the circled numbers? CREATE PUZZLES Create your own puzzle. Then, save and share for others to solve. Here is some sample code.

On laptop: If code window does not appear at right of canvas, use Control or Command key and minus (-) to reduce screen resolution. On tablet or phone: Scroll to access code window below canvas.

Your browser does not support the HTML5 canvas tag.

Project Name: None