↑ All Courses

Link to this page: bit.ly/db-spjh

Classroom Tools

Resources

Optional Supplemental Material

2021-03-26

Adventure Game: Adding Randomness

Start here. We’ll add these features in class:

  • award a randomly-chosen number of knowledge points (randint)
  • randomize the messages that appear in the various game places (randint, choice, and if)

Optionally do the assignment in Google Classroom.

2021-03-19

Adventure Game: More Practice with print, input and if

2021-03-12

Practice with print, input and if

day = 'Friday'
print('Hello, world! Today is', day)

name = input('Hi. Your name? ')
print(name)

answer = input('What is "hello" in Spanish? ')
if answer == 'hola':
  print('Right!')
else:
  print('Sorry, the answer is "hola"')

Once you are comfortable with those, please make something with p5.js, Python, Blender or Tinkercad Codeblocks.

2021-03-05

Python Dictionaries, Continued

Let’s get everyone to submit a correct program

If you have submitted a correct program, please make something with p5.js, Python, Blender or Tinkercad Codeblocks. Maybe you’d like to show something you make.

(Grade 6, in the classroom, experienced videoconference problems. We barely got through the “Hello, world” warmup.)

2021-02-26

Opening a Door in Unity

Python Dictionaries, Continued

Let’s get everyone to submit a correct program

2021-02-19 Python Dictionaries

Start here

2021-02-12

Game Character Generator

Using Python and Flask, make a web app that generates the attributes of a game character.

Start here

Grades 6–8 got to version 2 of the project.

2021-02-05

Current Weather Web App, Continued

Show Data on the Web Page

Find weather items from the data below, and add them to your web page.

coord {'lon': -122.1119, 'lat': 37.8961}
main {'temp': 12.59, 'feels_like': 10.04, 'temp_min': 11.67, 'temp_max': 13.33, 'pressure': 1024, 'humidity': 47}
visibility 10000
wind {'speed': 1.16, 'deg': 29}
sys {'type': 1, 'id': 3581, 'country': 'US', 'sunrise': 1612537726, 'sunset': 1612575374}
name Lafayette

In your index.html file you use pairs of braces to extract the elements you want. For example, {{weather.main.temp}} gives you the temperature. Can you find main and temp in the data above? {{weather.main.feels_like}} gives you the “feels like” temperature. Can you find main and feels_like above? How about {{weather.main.humidity}}?

How would you get the wind speed? That’s in a different section. {{weather.wind.speed}} gets you wind speed. What about wind direction (measured in degrees)? Sunrise and sunset?

2021-01-29

Last Week’s Assignment

Questions?

Current Weather Web App

We will create a web app to show the current weather, using Python and the Flask web application framework.

2021-01-22

Create a p5.js program on repl.it demonstrating that you’ve met the objectives from 2021-01-08. Provide a link to your program in response to today’s assignment in Google Classroom.

More p5.js Information

2021-01-08

p5.js, Continued from 2020-11-20

Exercise: Create something with 2D primitives

Log in to repl.it

Go to repl.it. Log in with a Google or other account.

Reference
Objectives
  • Become comfortable with the 2D (x, y) coordinate system and positioning shapes in it
  • Understand stroke and fill
  • Be able to place objects where you want them
  • Use width and height so that the result scales correctly when the canvas size is changed
  • Be able to use the p5.js reference to learn about p5.js

2020-12-18

Holiday-Themed Tinkercad Codeblocks Creations

One on One

Mr. B. will call on students to check on their progress.

2020-12-11

One on One

Mr. B. will call students in random order to work one on one with any of:

The rest of the class can watch or create something of their own.

2020-12-04

Advent of Code

About Advent of Code

Day 1 Puzzle

This Python code will get us started.

What we’ll learn while solving this problem:

  • reading data from a file into a list
  • looping over the contents of a list
  • a loop within a loop
  • adding numbers and comparing the sum to a number
  • multiplying numbers

2020-11-20

Grades 6–8

p5.js

Last week we practiced using JavaScript by itself, without p5.js. We now return to using JavaScript with p5.js.

Exercise: Create something with 2D primitives

Log in to repl.it

Go to repl.it. Log in with a Google or other account.

Reference
Objectives
  • Become comfortable with the 2D (x, y) coordinate system and positioning shapes in it
  • Understand stroke and fill
  • Be able to place objects where you want them
  • Use width and height so that the result scales correctly when the canvas size is changed
  • Be able to use the p5.js reference to learn about p5.js
Ideas
  • A house
  • A lake with cabins surrounding it
  • A robot
  • A musical instrument
  • A person
  • Birds in the sky

2020-11-16

Grade 5

Tinkercad Codeblocks

Loops

We’ll create a row of several objects (pyramids, perhaps) by repeating a sequence of blocks. Then we’ll shorten the code by using a loop.

2020-11-13

Grades 6–8

JavaScript Basics, in Coding Rooms

You don’t need to create an account. Please provide your real name instead of “anonymous something”.

  • “Printing” to the console
  • Creating variables
  • Printing numbers, expressions, and variables
  • Loops
  • Random numbers

2020-11-06

Grades 6–8, Short Schedule

p5.js

See description in 2020-11-20, where we continue.

Exercise: Create something with 2D primitives

If You Already Know All This

If you don’t need this lesson, please explore your own p5.js ideas and projects, or make something with Python, Blender or Tinkercad Codeblocks.

Progress

Grade 6: Technical problems, perhaps due to not using headphones. Little progress.
Grade 7: Got through the corners problem solution, and started on the exercise. Needed to turn off the camera of the person speaking in order hear that person without garbling.
Grade 8: Good discussion in show and tell/ask a CS question. Need to repeat the corners explanation.

2020-10-30

Grades 6–8

Show and Tell

Ask Your Computer Science Questions

p5.js

Grade 5

No meeting today

2020-10-16

Grades 5–8

Show and Tell

Ask Your Computer Science Questions

p5.js

Review/Introduction

Our p5.js page:

If You Don’t Need the Review

If you don’t need the review, please explore your own p5.js ideas and projects, or make something with Python, Blender or Tinkercad Codeblocks. Maybe you’d like to show something you make.

Rainbow colors program:

let hue = 0

function setup() {
  createCanvas(700, 450)
  background('black')
  colorMode(HSB)
}

function draw() {
  noStroke()
  fill(hue, 100, 100)
  ellipse(mouseX, mouseY, 200, 30)
  ++hue
  if (hue > 360)
    hue = 0
}

2020-10-09

Grades 5–8

Mr. B’s Show and Tell

Ask Your Computer Science Questions

One on One, Continued

2020-10-06

Grade 5

See 2020-10-02, Grades 6–8

2020-10-02

Grades 6–8

Mr. B’s Show and Tell

One on One

Mr. B. will call students in random order to work one on one with any of:

  • Python
  • Blender
  • Tinkercad
    • Codeblocks

The rest of the class can watch or create something of their own. Ideas (from past lessons):

  • Continue the silly sentences program
  • Use Python with Blender to create various objects in a scene
  • Use Codeblocks with Tinkercad to make something

2020-09-18

Grades 5–8

Mr. B’s Show and Tell

Dice throwing Unity program

Python

  • Random numbers
  • Loops
    • (Grade 5 got to here, but haven’t finished)

Codeblocks

  • Random numbers
  • Loops

Python in Blender

  • Creating multiple objects at random locations
    • (Grade 6 got as far as creating a single object)

2020-09-15

Grade 5

Mr. B’s Show and Tell

Something in Blender

  • a cube
  • subdividing into 27 smaller cubes
  • extruding faces to make new parts
  • moving a face
  • coloring with materials

Python

Python Exercises

  • print string literals
  • print arithmetic expressions
  • almost got to create a loop with for

Python

Python and Blender

A cube of monkeys

import bpy

s = 7
for x in range(s):
    for y in range(s):
        for z in range(s):
            bpy.ops.mesh.primitive_monkey_add(location=(x * 3, y * 3, z * 3))

2020-09-11

Grades 6–8

Mr. B’s Show and Tell

Something in Blender

Installing Blender

Problems? It’s free.

Tinkercad Alternative

If you aren’t able to run Blender, please make something with Tinkercad Codeblocks during class today.

Python

Python and Blender

Switch to the Scripting workspace (the tab at the top). Click New in the large window that appears to create a space where you can write Python code.

A cube

import bpy

bpy.ops.mesh.primitive_cube_add()

A row of cubes

import bpy

s = 7
for x in range(s):
    bpy.ops.mesh.primitive_cube_add(location=(x * 3, 0, 0))

A cube of cubes

import bpy

s = 7
for x in range(s):
    for y in range(s):
        for z in range(s):
            bpy.ops.mesh.primitive_cube_add(location=(x * 3, y * 3, z * 3))

Grade 5

Mr. B’s Show and Tell

Something in Blender

Installing Blender

Problems? It’s free.

Tinkercad

Let’s look at some of your Tinkercad creations.

Python

Let’s do some Python programming together.

from random import choice
nouns = ['girl', 'farmer', 'bicycle']
verbs = ['runs', 'cooks', 'swims']
print(choice(nouns), choice(verbs))

2020-09-04

Grades 6–8

Mr. B’s Show and Tell

Latest Unity project

Tinkercad

Let’s look at some of your Tinkercad creations.

Python

Let’s do some Python programming together.

from random import choice
nouns = ['girl', 'farmer', 'bicycle']
verbs = ['runs', 'cooks', 'swims']
print(choice(nouns), choice(verbs))

2020-08-28

All Grades

  • Join your Google Classroom
  • Mr. B’s latest fun projects
  • Tinkercad
    • We can make 3D models and use them in games we create
    • Log in
      • Using a Google account may be easiest
    • Go through tutorials to learn the basics
    • Make something (house, animal, vehicle, whatever you like)
    • Codeblocks
      • Let’s make something together
      • You make something else on your own

2019/20 School Year

May 27, 2020

Grade 5

  • Experimenting with physics with a Unity program
  • Jointly developing a p5.js program

Grades 6 and 7

  • Experimenting with physics with a Unity program
  • Learning some C♯ on Edabit.com

May 20

Mr. Briccetti’s Unity Learning Progress

Demo of falling balls project

Writing Text with p5.js

This simple example displays a centered message.

Greeting or “Thank You” Card with p5.js

Using this example if you like, make a greeting or “thank you” card with p5.js, or use any other programming language or environment, such as MakeCode Arcade, Python, Phaser, Scratch, or Snap! to make a card.

Remember that when you use web-based environments, your programs may be visible to the public, so don’t write anything that should be private.

Classes over the Summer and Beyond

Have your parents get in touch if you’re interested in continuing to learn with me.

May 13

Processing Community Hangout

Blog Post

Unity Game Development Platform

Company Web Page

Silly Sentences Program in Python

Starting Code

May 6

Conway’s Game of Life

Wikipedia Article

Mr. Briccetti’s Implementation

Apr 29

MakeCode Arcade

Head to MakeCode Arcade and I’ll guide you through making a project, or if you prefer, you can follow tutorials there.

Apr 22

MakeCode Arcade

Head to MakeCode Arcade and I’ll guide you through making a project, or if you prefer, you can follow tutorials there.

Apr 8

p5.js Collaborative Work and Edabit Problems, or Independent Work

I’ll give the link to the shared p5.js program in the videoconference. Here is Edabit. Please answer the question in Google Classroom. Answering the question will also show that you attended today.

Apr 1

Edabit Problems or Independent Work

Let’s do some Edabit problems. Please answer the question in Google Classroom. Answering the question will also show that you attended today.

Mar 25

p5.js Review or Independent Work

Let’s review making p5.js sketches. If you don’t need the review, please work independently on something harder, and prepare to show the class your accomplishments.

Mar 24

Office Hours

Please see “Office Hours” in Google Classroom.

Mar 11

User Interface Controls in p5.js

Notice that the snake game now has sliders you can move. Let’s learn how to create them.

Things you might control with sliders:

  • red, green, and blue color amounts
  • translations
  • rotations
  • numbers of objects
  • speed of movement

Use one or more sliders and describe what you did in a class comment in Google Classroom.

Mar 4

Health Note

Wash your hands often. We have hand sanitizer. Shared computer keyboards and mice might have germs. Avoid touching your face when someone else’s germs may be on your hands.

Grades 6 and 8

  • Circuit Playground Express review and practice
  • Free programming time
    • Circuit Playground Express, p5.js, Python, Phaser, etc.
  • Describe your accomplishments in Google Classroom

Grade 5 Guests

  • Introduction to MakeCode and Circuit Playground Express

Feb 26

Larry Tessler

Cut and paste

Play the 3D Snake Game and design a new feature

Snake game
Video lessons

Free programming time

Feb 19

p5.js Camera movement

Feb 12

p5.js 3D transformations

  • Landing on a planet (a sphere)
    • sphere
    • transformations
      • translate
      • push, pop
    • using a variable for the z argument to translate

Feb 05

Grade 6: Continue p5.js Introduction

Grades 7–8: Continue to develop 3D Snake Game

Jan 29

Grade 6: Continue p5.js Introduction

Grades 7–8: Continue to develop 3D Snake Game

  • Demo of my work in progress
  • Quiz on keyboard processing
  • Continue with 2D version

Jan 22

Sonic Pi Quiz

Grades 7–8: p5.js keyboard input

Jan 15

Sonic Pi Quiz

Sonic Pi Lesson

  • Shaping the volume of notes with Attack, Decay, Sustain, Release (ADSR) envelopes

Lab

  • Experiment with ADSR envelopes
  • Sonic Pi Tutorial Learn something new from Dr. Sam Aaron’s Sonic Pi Tutorial, and apply it to one of your own creative ideas. Describe what you did in today’s Google Classroom assignment, in the class comments.

Jan 8

Smart Thermostat

Github project

Sonic Pi Quiz

Sonic Pi Lessons

Lab: Sonic Pi Tutorial

Learn something new from Dr. Sam Aaron’s Sonic Pi Tutorial, and apply it to one of your own creative ideas. Describe what you did in today’s Google Classroom assignment, in the class comments.

Dec 18

Sonic Pi Quiz

Sonic Pi Lecture

Dec 11

Holiday Toy Hack

Example video

Sonic Pi Quiz

Sonic Pi Lecture

  • Reverberation effect
  • Repeating with times

Multiple Activities

You choose what to work on today, out of anything we’ve studied this school year and last.

Write what you accomplished in today’s Google Classroom assignment.

Dec 4

Holiday Toy Hack

Sonic Pi Lectures

Multiple Activities

You choose what to work on today, out of anything we’ve studied this school year and last.

Write what you accomplished in today’s Google Classroom assignment.

Nov 20

Multiple Activities

You choose what to work on today, out of anything we’ve studied this school year and last. Consider:

How to Get Help or Help Others

  • Ask another student
  • Use RoomHelper 3000 to ask for help
  • If you can help others, please write your name on the board under the subjects you can help with

Nov 13

Continuing with Sonic Pi

Nov 6

Introduction to Sonic Pi

Oct 30

Quiz and Review

  • What is the range of motion, in degrees, of the servo motor we’re using?
  • What is the name of the inefficient sorting algorithm we learned?

CPX Lesson

Oct 23

Quiz and Review

  • What is the name of the code that lets us represent letters and symbols as numbers?
  • How are color pictures represented in a computer?
  • What language did we introduce for Circuit Playground Express last week?

CPX Lesson

Oct 16

Quiz and Review

  • Python Hello, World and other simple programs
  • Bubble sort visualization that student Joaquin and I made

Edit with the p5.js editor

Online Problem Solving Programming with Edabit

  • Let’s work an Edabit problem or two
    • Log in with a Google account
    • Choose very easy and Python

CPX Lesson

Oct 9

Quiz and Review

  • the bubble sort activity from last week
  • how information is represented in computers in binary

Python

Introduction to Python

Soon we will be programming the Circuit Playground Express with Python (instead of MakeCode blocks). Let’s review (or learn for the first time) Python.

  • In a new browser tab, open
    • repl.it
      • Log in with the Google icon
      • Skip the questionnaire
      • Push the New Repl button
      • Choose Python (not Python 2 or Turtle)
      • Push Create Repl
    • Getting Started with Python (class Python web page #2)

      • Copy and paste Hello, World and other code fragments from here to repl.it and try them out. Experiment. Make changes.

Free Programming Lab Time

Practice Python, or program the CPX.

Oct 2

Binary Numbers Quiz in RoomHelper 3000

Algorithms

Hungarian Bubble Sort Dance

Ten Students Perform Bubble Sort

CPX Lesson

September 25

Students as Binary Digits

Seven students will come to the front of the class and represent the powers of 2: 1, 2, 4, 8, 16, 32, 64, and 128. One or more students will be calculators, and will stand at the whiteboard. I will give them a message to encode, letter by letter. They will display the binary representation of the letter’s ASCII code with 0s and 1s held in front of them. The class will decode each letter, and type it into RoomHelper 3000.

Here are the ASCII codes, in decimal (base 10) for the letters of the alphabet:

a: 97     h: 104    o: 111    v: 118 
b: 98     i: 105    p: 112    w: 119
c: 99     j: 106    q: 113    x: 120
d: 100    k: 107    r: 114    y: 121
e: 101    l: 108    s: 115    z: 122
f: 102    m: 109    t: 116 
g: 103    n: 110    u: 117 

Multiplayer Finger Drawing with Computer Vision

I’ll have a video camera at the front of the room. Three students will come up at a time to draw with their fingers. Each student will have a small colored piece of paper taped to a fingertip. They will hold it to the camera in the middle of the scene so we can calibrate the color recognition. Then they can draw.

CPX Lesson

September 18

CPX Lesson: Musical Instrument using the Accelerometer

September 11

Reminder of last week’s binary representation and decoding lesson

There are two options today: a computer vision exercise with OpenCV and Python, and an easier exercise with CPX. Do one or both.

Computer Vision

After having you manually decode the secret message from changing patterns of bits on the CPX, I had the thought, “Why not write a computer program to see and decode the message, and make it really fast”. Here’s the result:

Here’s an explanation:

If you want to really get into it, here’s the whole playlist.

OpenCV and Python

Extract parts of an image by hue

CPX Lesson: Represent What the CPX is Sensing with Lights or Sounds

September 4

How Many Bits per Pixel in Steganography?

CPX lesson and play

August 28

  • A quick lesson on Steganography based on this project
  • CPX lesson and play

August 21, 2019

Welcome back. Introducing the Adafruit Circuit Playground Express.

2018–2019