CSC 161 Grinnell College Spring, 2015
Imperative Problem Solving and Data Structures

CSC 161 Module to Introduce Conditionals, Loops, and Scribbler 2 Motion


This module introduces CSC 161 students to several fundamental elements of programming in C, including:

  1. using conditional statements (e.g., if, switch),
  2. using loops (e.g., initialization, iteration, condition testing, loop body with for, while), and
  3. introducing motion with the Scribbler 2 robot.

Day-by-day Details

Day Topic Preparation In-class Due Date Availability
Friday, January 30 Module 001: Conditionals, Loops, and Motion Examples    
Monday, February 2 Types and Variables (with casting)
  • Reading from Text
    • King: Sections 7.1-7.5, pages 125-148, OR
    • Kernighan & Ritchie, 1.1, 2.1-2.4, 2.7
Types and Variables Lab    
Tuesday, February 3 Conditionals, Scribbler 2
  • Motion
  • Sensors
Conditionals Lab    
Wednesday, February 4 Loops and Scribbler 2 Motion Loops Lab   Extra credit available if submitted by Wednesday, February 18
Friday, February 6 Supplemental Problem 1   Supplemental Problem 1 (done individually) Friday, February 6  
Friday, February 6 Project   Robot performs looped actions and sounds Friday, February 13  

Project Options

Working in pairs, students should develop a program that includes these elements:

Together with the program, a student pair must write a paragraph that describes what steps are needed to demonstrate the program is working correctly. That is, once the program is written, what do you need to do in order to check it is performing properly. (This might include describing some runs, in which obstacles are placed in the path of the robot.)

Project Submission

As with Project 000, submission of your project should come in two parts:

Some additional guidelines follow: