View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Christopher Michaud

Greetings! I will post links to Beginning Programming Assignments here:

Assignment #1: Dancing Myro Activity

Assignment #2: We all come from Red, Green, and Blue!: Pixels and Arrays in Python

Quick Tip for Using "repaint" to show progress of Changing Picture:

def decreaseTopHalfRed(pic):
  for x in range(1, getWidth(pic)):
    for y in range (1, getHeight(pic)/2):
      p = getPixel(pic,x,y)
      value = getRed(p)
      setRed(p, value * .5)

Collage Pictures:

Code can by found at:



Chromakey code:

# Chromakey Function with ability to select
# Where you want subjet to go
# Mr. Michaud

def chromakey(chroma, bg, bgx, bgy):
  bgtargetX = bgx
  for chromaX in range(1, getWidth(chroma)):
    bgtargetY = bgy
    for chromaY in range(1, getHeight(chroma)):
      px = getPixel(chroma, chromaX, chromaY)
      tx = getPixel(bg, bgtargetX, bgtargetY)
      if getRed(px) + getBlue(px) < getGreen(px):
        setColor(tx, getColor(tx))
        setColor(tx, getColor(px))
      bgtargetY = bgtargetY + 1
    bgtargetX = bgtargetX + 1
  return bg


Assignment #3: Palindromes in JES

Teacher instructions:
Student Worksheet:
Youtube Link to Mozart Palindrome Duet:
Sheetmusic to Mozart Palindrome Duet:
Palindrome Sound Sample:

Assignment #4 Idea: Warhol Effect


Code Sample for Warhol Effect:

# Warhol Effect
# Mr. Michaud

# Function to Scale down picure by 1/2

def scalePicDown(pic):
  canvas = makeEmptyPicture(getWidth(pic)/2, getHeight(pic)/2)
  picX = 1
  for targetX in range(1, getWidth(canvas)):
    picY = 1
    for targetY in range(1, getHeight(canvas)):
      color = getColor(getPixel(pic, picX, picY))
      setColor(getPixel(canvas, targetX, targetY), color)
      picY = picY + 2
    picX = picX + 2
  return canvas

# Picture Chooser

def pickAndMakePicture():     
  Pic1 = pickAFile()
  Pic1 = makePicture(Pic1)
  return Pic1

# Warhol Effect

def warholEffect(pic):
  dest = scalePicDown(pic)
  dest = scalePicDown(dest)
  canvas = makeEmptyPicture(getWidth(dest)*8, getHeight(dest)*8)
  # Start copying in pictures
  for y in range(8):
    for x in range(8):
      canvas = copy(dest, canvas, (getWidth(dest)*x + 1), (getHeight(dest)*y)+1)
  return canvas

# General Copy Function

def copy(source, target, targX, targY):
  targetX = targX
  for sourceX in range(1, getWidth(source)):
    targetY = targY
    for sourceY in range(1, getHeight(source)):
      px = getPixel(source, sourceX, sourceY)
      tx = getPixel(target, targetX, targetY)
      setColor(tx, getColor(px))
      targetY = targetY + 1
    targetX = targetX + 1
  return target

More Assignments in Python and JES: (These are designed for Elementary and Middle School students)
(Could be used for introduction to programming at High School)

1. Turtle Simple Shape Drawing in Python (for IDLE or any Python IDE):

2. More Advanced Turtle Designs: (for IDLE or any Python IDE)

3. Using MIDI and playNote() function in JES to make music:

More resources for teaching technology can be found at:

Links to this Page