Logo for Eastern Oregon University

CS 161
Foundations of Computer Science I
 

Index

Current Classes

Sample Student Work
Vita
More About Dr. Croft

CS 161:

General Course Information
Assignments
Examples & Sample Solutions

 

 

Examples and Sample Solutions

A simple program illustrating input, processing, and output. It uses integer division and modulo to compute feet and inches from feet.

A simple program with functions (none return anything)

A similar program with more functions (one returns a value)

A program that uses lists (used in class as a demonstration).

Exercises

Exercise One Sample Solution

Exercise Two Sample Solution

Exercise Three Solved

Excercise Four Solution

Extra Credit Problems (Sample Problems)

Date Validation

myRange

Programs

Program One Sample Solution

Program Two Sample Solution

Here is a similar program for another problem

Program Three Sample Solution

Program Four: A "Good Enough" Version and An Elegant Version

Program Five Sample Solution

Quizzes

Quiz One Answered

Quiz Two Solutions

Quiz Three Laid Bare

Quiz Four Tells All