CSC 161 Grinnell College Fall, 2011
Imperative Problem Solving and Data Structures

Semester Outline for CSC 161

Module Dates Overall Purpose Summary and Main Topics Examples Lab Exercises Project Theme
0 (module details) Friday, August 26 — Tuesday, September 6 Introduction: Play a song
This module helps CSC161 students to gain familiarity with foundational concepts of C programming, the Scribbler robot, and the Linux terminal.
Basics of Linux and C
  • basic Linux
  • introduction to using the terminal
  • elements of a C program, including variables and primitive types
  • basic Scribbler actions (beeping)
  • Pirates of the Caribbean
  • Spirit Song
Program a song
1 (module details) Wednesday, September 7 — Friday, September 16 Motion (+song, motion)
This module introduces and explores the possibilities that are offered by loops and conditionals. These capabilities are applied to controlling a robot that creates sounds and moves simultaneously.
Control structures
  • conditional statements
  • loops (e.g. initialization, iteration, condition testing, loop body, for, while)
  • Scribbler motion
  • Dance
  • Ice cream truck
  • Types and variables (with casting)
  • Conditionals, Scribbler motion
  • Loops
  • Loops and Scribbler 2 motion
Make the robot dance and sing
  Monday, September 23 Hour Test 1
2 (module details) Monday, September 19 — Wednesday, September 28 Motion and sensors
This module expands the CSC161 students' working knowledge of C language, improves problem solving and creativity, and creates an introduction to more complex programming.
functions and arrays
  • one-dimensional arrays,
  • writing functions,
  • testing programs and functions,
  • values and addresses,
  • Scribbler 2 motion and sensors
  • Avoid object
  • Move until a wall and turn right
  • Follow moving object
  • Braitenberg machine: Alive
  • 1-dimensional arrays
  • testing:
  • functions and parameters
  • values, addresses, and the & operator (2 labs)
Follow a moving object

Friday, September 30 — Tuesday, October 4 Data representation Representation of numbers
  • non-negative binary integers
  • sign-magnitude, ones- and twos- complement notation
  • floating point representations
  • integer representation
  • floating-point representation
3 (module details) Wednesday, October 5 — Monday, October 24 Deepen understanding of imperative problem solving and C
The purpose of this module is to deepen understanding of the C language and smoothly integrate previous experience in the course into the larger framework of programming in C.
  • characters
  • strings
  • input/output
  • forthcoming
  • characters and strings
  • Input/output
  • I/O: basic menu framework
Robot follows typed commands
  Wednesday, October 12 Hour Test 2
4 (module details) Tuesday, October 25 — Friday, November 4 Image Processing
The purpose of this module is to introduce the customizable nature of self-written programs by using structs and 2-dimensional arrays.
Structured data
  • structs
  • 2-dimensional arrays
  • change pixel (shell, full program)
  • transform pictures
  • transform a pixel
  • transform pixels in a picture
  • sort pixels in a picture
Transform a Picture
5 (module details) Wednesday, November 2 — Monday, November 14 Music Composition
This module introduces dynamic data structures (with pointers and linked lists) as a means to store lines of music that evolve through the composition process.
Dynamic data storage
  • pointers
  • linked lists
  • insert theme into canon/fugue
  • pointers: create/return array, populate with sensor data
  • linked lists (2 labs)
Music composition --- insertion of series of notes periodically into song tune
6 (module details) Tuesday, November 15 — Monday, November 28 Storage/retrieval Patterns
This module increases familiarity with programming in C, integrates the Scribbler 2's sensors into the curriculum, and continues to practice previously-introduced concepts
The purpose of this module is to clarify previously introduced concepts, such as
  • more pointers and linked lists
  • queues
  • stacks
  • Bash scripts
  • Transform image in various ways
  • stacks
  • queues
  • Bash scripts (for testing)
Do something interesting with pictures or travel in a maze
  Monday, November 21 Hour Test 3
7 (module details) Tuesday, November 29 — Friday, December 9 Integrated Robotics
This module integrates and reviews material that has been presented through the semester, with a particular emphasis on C programming concepts and full usage of the Scribbler robot.
Advanced Input/Output
  • Files
  • Command-line arguments
  • use robot with command-line actions and with log file
  • reading and writing with files
  • files for include, separate compilation, separate linking
  • command-line arguments
Robot motion with logging

This document is available on the World Wide Web as

created created 14 July 2011
last revised 2 September 2011
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at