Functional Problem Solving (CSC 151 2014S) : EBoards

CSC151.02 2014S, Class 56: Discussion of Exam 3 and Review for Final


Overview

Preliminaries

Admin

Extra Credit

Questions

Quiz!

  1. Write a definition for the map procedure [5 points]

    (define map
      (lambda (fun lst)
        (if (null? lst)
            null
            (cons (fun (car lst)) (map fun (cdr lst))))))
    
  2. Write a function, squares, that, given n, computes the list (1 4 9 16 ... n^2) [5 points]

    > (squares 5)
    '(1 4 9 16 25)
    > (squares 0)
    '()
    > (squares 3)
    '(1 4 9)
    
    
    (define squares
      (lambda (n)
        (map square (cdr (iota (+ n 1))))))
    

Hacking 2048

About the final

Short discussion of exam 3

Some questions about the course

Something I should do differently/better in the fall * Respond more to labs. * Generally not enthusiastic about switching to "what were the big ideas of this lab" writeups, which were recommended by 207. * Do more physical demonstrations of algorithms * Optional "flipped" videos? Good for some, worry about work with others. Watch someone write the code. Talk about some of the small parts. * Don't force partners. Many people will learn more doing it on their own. * Distribute virtual machines earlier. * Focus on lab time. * Exams were challenging; maybe twice as many half as long?


Samuel A. Rebelsky, rebelsky@grinnell.edu

Copyright (c) 2007-2014 Janet Davis, Samuel A. Rebelsky, and Jerod Weinman. (Selected materials are copyright by John David Stone or Henry Walker and are used with permission.)

Creative Commons License

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/3.0/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.