CSC 100: The Beauty and Joy of Computing

Lab Exercises

As part of the CSC 100 (The Beauty and Joy of Computing) course development at UNCG, we have created a lab manual with detailed lab exercises. Initially, these exercises drew on exercises used at the University of California at Berkeley, but have undergone some significant changes and are now fairly unique to the UNCG class. These write-ups provide a significant amount of "context" for the activities, going beyond simply giving a list of actions for the students to do. While that makes these lab write-ups significantly more wordy, requiring more time to read through, we hope that the added context make these stand on their own better for students and other teachers who want to develop and deliver a CS Principles class. These exercises are distributed under a Creative Commons licence - see the "Introduction" below for more information.

Introductory Material

Lab Exercises

  • Lab 1: Introduction to Scratch/BYOB - animations and communication (for Aug 22)

  • Lab 2: Making things interesting with interaction, variables, and more (for Aug 29)

  • Lab 3: Abstraction with Functions (for Sept 5)

  • Lab 4: Starting a simple math tutor program (for Sept 12)

  • Lab 5: Using Lists for Data (for Sept 19)

  • Lab 6: Exploring Programming Languages (for Sept 26)
        Files for Lab 6:

  • Lab 7: Experimenting with Algorithms (for Oct 3)

  • Lab 8: SnapPy Exploration and Testing (for Oct 10)
        File for Lab 8:

  • Lab 9: Problem self-similarity and recursion (for Oct 17)
    BYOB version
    Python version

  • Lab 10: Shall We Play A Game? (for Oct 24)
    BYOB version No Python version after all....

Update: Python version of Lab 10, and SnapPy update

While I didn't have a Python version of Lab 10 available in time for the lab, the write-up and associated code are given here for any students who would like to experiment with this.

Nov. 7 update: The new version of SnapPy adds support for "clipping" costumes - in other words, having a sprite display just part of a costume. You can use this to put lots of separate costumes into a single image file (like, for example, a single image that includes an entire deck of 52 cards) and then just select the part that you want. Costume clipping is accomplished with two new sprite methods:

  • sprite.setCostumeClip(x,y,w,h) - sets the costume clipping area as a rectangle of that starts at position (x,y) and extends down and to the right from that point for width w and height h. For example, alonzo.setCostumeClip(10,15,40,45) will set the displayed Alonzo costume to be just the portion of the original Alonzo image that is 40x45, starting at pixel (10,15).
  • sprite.resetCostumeClip() - this removes the clipping rectangle so that the entire costume is displayed.