problems and solutions
We will be done if...
- npx create-react-app is runs and completes successfully
- student can run the react app created by the above
javascript: (async () => { const RoughNotation = await import('https://unpkg.com/rough-notation?module'); const pick = (arr) => arr[Math.floor(Math.random() * arr.length)]; const colorNames = "#66FF66 #FD5B78 #FF9966 #FFFF66 #50BFE6 #FF00CC".split(" "); document.querySelectorAll('p').forEach(elem => { RoughNotation.annotate(elem, { type: 'box', color: 'black', strokeWidth: pick([1, 2, 5]) }).show(); }); document.querySelectorAll('a').forEach(elem => { RoughNotation.annotate(elem, { type: 'highlight', color: pick(colorNames) }).show(); elem.style.color = 'black'; }); })() |
(async () => { | |
const RoughNotation = await import('https://unpkg.com/rough-notation?module'); | |
const pick = (arr) => arr[Math.floor(Math.random() * arr.length)]; | |
const colorNames = "#66FF66 #FD5B78 #FF9966 #FFFF66 #50BFE6 #FF00CC".split(" "); | |
document.querySelectorAll('p').forEach(elem => { | |
RoughNotation.annotate(elem, { type: 'box', color: 'black', strokeWidth: pick([1, 2, 10]) }).show(); | |
}); | |
document.querySelectorAll('a').forEach(elem => { |
let allCountryScores = [ | |
{ | |
name: "Ethiopia", | |
scores: [ {n: "Hanif", s: 999999999}, {n: "neill", s: 999999}, {n: "bob", s: "4134234"}, {n: "Hanif", s: "700"}] | |
}, | |
{ | |
name: "Scotland", | |
scores: [ {n: "lucy", s: 9999}, {n: "groundkeeper willie", s: 4000}, {n: "braveheart", s: 200}] | |
}, | |
{ |
Latest version of this page is at https://www.notion.so/neillzero/Creative-Coding-Lunch-6da6f9b0ce0e49a2a1bf918ebf8ad721
Class code for Creative Coding Wednesdays
import math | |
car = Actor("car_blue") | |
car.x = 200 | |
car.y = 200 | |
car.speed = 1 | |
accel = 0.5 | |
turning_speed = 1 | |
def update(): | |
# handle player inputs |
# Inverse Kinematics tenacles with python and pygamezero | |
# Roughly following Daniel Shiffman's algorithm: | |
# https://www.youtube.com/watch?v=xXjRlEr7AGk | |
# pygamezero docs: | |
# https://pygame-zero.readthedocs.io/en/stable/builtins.html | |
import math | |
import random |