CMPU-101-54 Computer Science I and Lab. (Spring 2019)

This calendar will evolve over the course of the semester. Typical entries will include links to the code we have studied in class, details of lab. problems and assignments, and sections of the textbook we covered in class.

Wk.

Tuesday
Class

Thursday
Class

Friday
Lab.

I
24th January

Welcome and Introduction.
25th January

II
29th January

31st January


Code from class
1st February

III
5th February

Non-empty lists and how they store data. Scheme's computational model, the Default Rule ('evaluate and apply'). A close look at the eval function. The quote function.
Reading
Chapter 6 (6.2.1 optional).
Chapter 7.2.
Code from class
7th February

Review of the Default Rule and the eval and quote functions. Predicates: type checking (e.g. number? and null?) and comparisons (e.g. < and >=). The eq? function.
8th February

Beginning conditionals with if. Nesting if expressions for more complicated reasoning.
Code from class
IV
12th February

Beginning recursion: solving problems by applying a function to its own output, such as evenly dividing a double chocolate cake. (Yum.) The factorial function.
Reading
Chapter 12.
Homework
Solve In-Class Problem 12.1.2.
Code from class
14th February

Review of recursion. Introduction to more complex conditions with cond.
Code from class
15th February

V
19th February

Adventures in logic: more complex conditional expressions with boolean operators. Introducing and, or and not.
Reading
Chapter 13.2.
Homework
Review the in-class functions to make sure you fully understand the boolean operators.
Code from class
21st February

Continuing with booleans. Removing if or cond from predicates. Simplifying expressions.
Code from class
22nd February

VI
26th February
Beginning list recursion. Accessing the contents of a list with first and rest. Stitching lists together with cons. Revisiting null?.
Reading
Chapter 16.2.
Homework
Solve In-Class Problems 16.2.3 and 16.2.4.
Code from class
28th February
More list recursion. Using recursion to find a element of a list. Predicates with list recursion. Using comparison predicates (e.g. <= and =) as inputs to a function.
Code from class

1st March

VII
5th March

More on list recursion. Concatenating lists. Merging lists. Merging lists with different numbers of elements.
Code from class
7th March
MIDTERM REVIEW.
Please bring questions & subjects to review.
8th March

IN-CLASS MIDTERM

Covers all material explored to date.
Saturday, 9th to Sunday, 24th March

SPRING BREAK


Happy holidays! :-)
VIII
26th March
Individual Reviews.
28th March

Return to recursion. Tail recursion. Using accumulators to store partial results of computations.
Reading
Chapters 14.2, 14.3.
Code from class
29th March

Code from class
IX
2nd April

Functions as inputs to another function. Calling one function we have written from another function we have written. Wrapper functions.
Reading
Sections 14.4, 14.5.
Code from class
4th April

Review of list recursion, wrapper functions and accumulators. Mapping functions. Calling functions from other functions.
Code from class
5th April

X
9th April

Local environments and local variables using let. Random numbers and how to store them.
Code from class
11th April

Local environments continued. Sequential evaluation of local variables with let*. Using letrec to write local recursive functions.
Code from class
12th April

XI
16th April

A conditional with only a true case: when. Beginning destructive programming: changing values of variables with set!. Iteration using while and dotimes
Code from class
18th April

Changing recursive functions to iteration-based functions.
Code from class
19th April

XII
23rd April
A bit more on iteration. Looking at the vector. Syntax of the vector and vector creation. Accessing and changing contents.
Code from class
25th April

Review of Assignment 9: considering nested loops and changing values with set!. Using vectors to speed up programs.
Reading
Chapter 19.0--19.1.
26th April

Storing information tidily using data structures. make-struct and other associated functions.
Code from class
XIII
30th April

2nd May

3rd May

IN-CLASS FINAL

Focuses on material since midterm,

but covers all material.

XIV
7th May

Last class :'-(