CMPU-101-04 Computer Science I and Lab. (Fall 2018)
Calendar
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. <html><center><h4></html> Please note that Tuesday, 11th December and Wednesday, 12th December have a Thursday and Friday schedule. <html></h4></center><br/>
<table border=3 bgcolor=purple cellpadding=8 width=100%>
<tr bgcolor=purple>
<td width=4% align=center valign="center"><b><h4><font color=white> Wk.</font></h4></b> <td width=32% align=center valign="center"><b><h4><font color=white>Tuesday<br>Class </font></h4></b></td> <td width=32% align=center valign="center"><b><h4><font color=white>Thursday<br>Class </font></h4></b></td> <td width=32% align=center valign="center"><b><h4><font color=white>Friday<br>Lab. </font></h4></b></td>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> I </b></font> </td> <td width=30% valign=top bgcolor="#aaffcc" cellpadding="8"> <center>4th September</center> <hr> Welcome and Introduction. <td width=30% valign=top bgcolor="#aaccff" cellpadding="8"> <center>6th September</center> <hr> Setting up a Computer Science (CS) department account. <br/> Introduction to the drRacket program. Poking the computer & seeing what happens. <td width=30% valign=top bgcolor="#ffcccc" cellpadding="8"> <center>7th September</center> <hr> Creating directories with <code>mkdir</code>. Moving between directories with <code>cd</code>. Listing files with <code>ls</code>. Your first program in Scheme. Running, saving and loading a program.
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> II </b></font> </td> <td width=32% valign=top bgcolor="#aaccff" cellpadding="8"> <center>11th September</center> <hr> Poking the computer (a second time). <b>Data types</b>. Evaluation of symbols to their definitions. The importance of parentheses. First explorations of Scheme's computational model. <hr> <center><b>Reading</b></center> Chapters 2, 3, 4 and 5. <td width=32% valign=top bgcolor="#aaffcc" cellpadding="8"> <center>13th September</center> <hr> Reviewing data types. Review of Scheme's computational model ('evaluate and apply'). The output of a function. The <code>printf</code> command and side-effect printing. Line breaks and substituting into printed text. What <code>lambda</code> does. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-09-13_lec.txt">Code from class</a> </center> <td width=34% valign=top bgcolor=gray> <center>14th September</center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> III </b></font> </td> <td width=32% valign=top bgcolor="#aaffcc" cellpadding="8"> <center>18th September</center> <hr> Using <b>predicates</b> to answer yes/no questions. Arithmetic predicates. The multipurpose <code>eq?</code> function. Shielding a datum from evaluation using the <code>quote</code> function, and its abbreviation. Beginning conditionals and the <code>if</code> statement. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-09-18_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="#aaccff" cellpadding="8"> <center>20th September</center> <hr> A brief review of <code>if</code>. Using <code>cond</code> for more complex situations, including the use of <code>else</code>. Contracts, how to write them and why they are important. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-09-20_lec.txt">Code from class</a> </center> <td width=34% valign=top bgcolor=gray> <center>21st September</center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> IV </b></font> </td> <td width=32% valign=top bgcolor="#aaccff" cellpadding="8"> <center>25th September</center> <hr> Introducing recursion. Infinite loops and how to avoid them. The <code>factorial</code> function (take 1). <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-09-25_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="#aaffcc" cellpadding="8"> <center>27th September</center> <hr> Recursion, part 2: the Fibonacci sequence. <hr> <center><b>Reading</b></center> Review Chapter 12. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-09-27_lec.txt">Code from class</a> </center> <td width=34% valign=top bgcolor=gray> <center>28th September</center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> V </b></font> </td> <td width=32% valign=top bgcolor="#aaffcc" cellpadding="8"> <center>2nd October</center> <hr> Return of conditionals. Introducing <b>boolean operators</b> <code>and</code>, <code>or</code> and <code>not</code>, and their "truth tables". <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-10-02_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="#aaccff" cellpadding="8"> <center>4th October</center> <hr> Review of boolean operators and "truth tables". Review of predicates. Writing predicates without <code>if</code> or <code>cond</code>. Introducing <b>non-empty lists</b>. <code>first</code> and <code>rest</code>. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-10-04_lec.txt">Code from class</a> </center> <td width=34% valign=top bgcolor=gray> <center>5th October</center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> VI </b></font> </td> <td width=32% valign=top bgcolor="#aaccff" cellpadding="8"> <center>9th October</center> <hr> Review of how <code>if</code> and <code>cond</code> can be interchanged with <code>and</code> and <code>or</code>. Constructing lists with <code>cons</code>. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-10-09_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="ffcc66"> <center>11th October <hr> <b>MIDTERM REVIEW.</b><br/>Please bring questions & subjects to review. </center> <td width=32% valign=top bgcolor=red> <center>12th October <h4>IN-CLASS MIDTERM</h4> <h5>Covers all material explored to date.</5> </center>
</tr>
<tr bgcolor=“#116611”>
<td colspan=4> <center> <h5><font color="#FFD700">Saturday, 13th to Sunday, 21st October</font></h5> <hr> <h4><font color="#FFD700">AUTUMN BREAK</font></h4> <hr> <h5><font color="#FFD700">Happy holidays! :-)</font></h5> </center> </td>
<tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> VII </b></font> </td> <td width=32% valign=top bgcolor="66ccff" cellpadding=8> <center>23rd October <hr> <b>Individual Reviews.</b> </center> <td width=32% valign=top bgcolor="#aaffcc" cellpadding=8> <center>25th October</center> <hr> The <b>Default Rule</b>, formally ('evaluate and apply'). Built-in functions <i>vs.</i> <b>Special Forms</b>; how special forms do not follow the Default Rule. The built-in <code>eval</code> function & how drRacket applies it at each step. <td width=34% valign=top bgcolor="#aaccff" cellpadding=8> <center>26th October</center> <hr> Introducing <b>tail recursion</b> and <b>accumulators</b>. The 'function box' as an analogy for drRacket's processing of code. <b>Wrapper functions</b> and writing contracts for them. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-10-26_lec.txt">Code from class</a> </center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> VIII </b></font> </td> <td width=32% valign=top bgcolor="#aaffcc" cellpadding=8> <center>30th October</center> <hr> Brief review of accumulators and wrapper functions. Returning to lists and list recursion. <hr> <center> <b>Thinking About Programs I.</b> </center> <p/> Starting from a single, simple function and an idea. Adding small improvements to our code as our ideas change. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-10-30_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="#aaccff" cellpadding=8> <center>1st November</center> <hr> List recursion continued. Passing a function as an input to a function. <b>Mapping</b>: applying the same function to every element in a list. Skipping items in lists. <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-11-01_lec.txt">Code from class</a> </center> <td width=34% valign=top bgcolor=gray> <center>2nd November</center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> IX </b></font> </td> <td width=32% valign=top bgcolor="#aaccff" cellpadding=8> <center>6th November</center> <hr> <b>Nested lists.</b> How to recursively explore nested lists. <hr> <center> <b>Thinking About Programs II.</b> </center> <p/> Adding help for the player, and how it requires us to change <code>if</code> to <code>cond</code>. Adding a variable to store the player's guess in two ways: first with <code>define</code> and then by using another wrapper function. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-11-06_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="#aaffcc" cellpadding=8> <center>8th November</center> <hr> Local environments. (And multicoloured candy apples.) The <code>let</code> special form: syntax and evaluation, and its similarities to functions using <code>lambda</code>. The <code>let*</code> special form. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-11-08_lec.txt">Code from class</a> </center> <td width=34% valign=top bgcolor=gray> <center>9th November</center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> X </b></font> </td> <td width=32% valign=top bgcolor="#aaffcc" cellpadding=8> <center>13th November</center> <hr> Review of list operations with <code>cons</code>. Review of <code>let</code> and <code>let*</code>. Defining recursive local functions with <code>letrec*</code>. <p/> First look at the <code>set!</code> function. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-11-13_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="#aaccff" cellpadding=8> <center>15th November</center> <hr> <b>Destructive programming.</b> Changing the values of variables with <code>set!</code>. The <code>while</code> function, which lets us loop any number of times. The <code>dotimes</code> function, which loops a fixed number of times. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-11-15_lec.txt">Code from class</a> </center> <td width=34% valign=top bgcolor=gray> <center>16th November</center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> XI </b></font> </td> <td width=32% valign=top bgcolor="#aaccff" cellpadding=8> <center>20th November</center> <hr> Review of loops using <code>dotimes</code>. Using the counting variable of an outer loop as input to the counting variable of an inner loop. The <code>when</code> special form. Comparing <code>when</code> against <code>if</code> and <code>cond</code>. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-11-20_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="#ff8000" colspan="2"> <center>22nd & 23rd November <hr> No class! <br/> <b><i>Happy Thanksgiving!</i></b> </center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> XII </b></font> </td> <td width=32% valign=top bgcolor="#aaffcc" cellpadding=8> <center>27th November</center> <hr> Organising data using <b>structures</b>. The <code>define-struct</code> special form, and the special forms it creates to help us use structures. <hr> <center><b>Reading</b></center> Chapter 19. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-11-27_lec.txt">Code from class</a> </center> <td width=32% valign=top bgcolor="#aaccff" cellpadding=8> <center>29th November</center> <hr> Storing data using <b>vectors</b>. <b>Mutable</b> and <b>immutable</b> vectors. Creating mutable vectors with <code>make-vector</code> and immutable vectors with <code>#(...)</code>. <code>vector-ref</code> and <code>vector-set</code>. <hr> <center><b>Reading</b></center> Chapter 18. <hr> <center> <a href="https://www.cs.vassar.edu/~cs101/ell-fal-2018/lecs/2018-11-29_lec.txt">Code from class</a> </center> <td width=34% valign=top bgcolor=gray> <center>30th November</center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> XIII </b></font> </td> <td width=32% valign=top bgcolor=gray> <center>4th December</center> <td width=32% valign=top bgcolor=gray> <center>6th December</center> <td width=32% valign=top bgcolor=red> <center>7th December <h4>IN-CLASS FINAL</h4> <h5>Focuses on material since midterm,<p>but covers <u>all</u> material.</h5> </center>
</tr>
<tr>
<td width=4% bgcolor=purple align="center" valign="center"> <b><font color=white> XIV </b></font> </td> <td width=32% valign=top bgcolor=gray> <center>11th December <u>(Thursday Schedule!)</u><p><b>Class</b></center> <td width=32% valign=top bgcolor=gray> <center>12th December <u>(Friday Schedule!)</u><p><b>Lab.</b></center> <td width=34% valign=top bgcolor=gray> <center>14th December <hr> No class! <br/> End of classes :'-(</center>
</tr>
</table> </html>