CSC-104: Robots Rule!

Course Overview

Learn to control robots before they control you

This introductory Computer Science Course will introduce you to the art of computer programming through interaction with robots. Over the course of the term you will build your own LEGO-based robot and learn to control it in a variety of interesting ways. By the end of the course, the successful student should be able to: Write programs that include scalar variables, arrays, structs, functions, and conditional and iterative control structures in Python; apply debugging strategies to diagnose and correct syntax, logic and run-time errors; apply the input/process/output model to the implementation of robots; design programs using a structured approach that includes algorithms and functional decomposition; discuss the interaction of computer hardware and software as applied to robotics; examine the social and ethical implications of robots

Language & Resources

Like the title says, language info etc.

In class, you are required to use our lab iMacs. However, when working on your projects outside of class, you have a choice. If you'd like to continue using our iMacs, feel free! We have three spaces that you can use:

All of these labs are available to you 24/7 using your ID card, except when classes are being held in them.

Course Text

The Practice of Computing Using Python, Punch and Enbody, Addison Wesley.

Example Assignment: Mystery Function

Looking more deeply at the robot's code, you are begining to suspect he has become sentient and is starting to program himself! You see the following function in the robot's code, but it was clearly written by a robot, since no human in their right mind would use variable names this meaningless!
def Scramble(n):
	letter = 3
	pigeons = [2]
	while(len(pigeons) > 0):
		banana = False
		for mango in pigeons:
			if letter%mango == 0:
				banana = True
		if (banana == False):
			pigeons.append(letter) #POINT B

		print '`so far:', pigeons     #POINT A
		letter+=1
	return pigeons
What does this function actually do? To explain, rewrite the function with a proper name and proper variable names below.

Example Lab: The Sense-Plan-Act Loop

Goals: by the end of this lab you will have:


0. Prelude: We'll begin with a very informal lecture on the sense-plan-act loop, as well as ultrasound sensors

1. A Basic SPA Loop

2. Bells and Whistles

3. Louder Bells and Whistles

4. Impress us!