Functional Problem Solving (CSC 151 2015F) : EBoards

CSC151.01 2015F, Class 14: Boolean Values and Predicate Procedures


Overview

Preliminaries

Admin

Upcoming Work

Extra Credit Opportunities

Academic

Peer Support

Exam Questions

I'm stuck on Problem 2. Any hints?

Tell me what problem from HW3 you think it's closest to.

Although it was not intentional that things worked out this way, use ideas from today's extras. (I'd prefer that you not use this approach, but it's legal.)

I'm stuck on Problem 5. Any hints?

Try an n of 736145 and various values of i.

    > (fun 418265 1)
    6
    > (fun 418265 2)
    2
    > (fun 418265 3)
    8

On question 4, do we have to take into account negative times?

I was trying to say the following in more polite terms: add-times is not defined with negative times, so it is wickedly stupid to try to write tests with negative times.

On question 2, what do we do when two numbers are largest?

Whatever you'd like. You can always give the same answer. You can give different answers. You can make the computer explode in a shower of sparks. You can give back 1, 2, or 3. You can give back 0.

On question 3, do we have to use the procedures you gave us?

CC and I spent literally days (or fractions thereof) writing those procedures. Of course you have to use them.

On question 5, how do I figure out the numerator and denominator?

Follow the parens!

How do you grade the exam?

I grade each problem on a ten point scale.

I add the seven scores together.

I multiply by 10/7.

I add the designated extra points (e.g., for recording times).

If the grade is lower than 70 and the "there's more to life" requirements are met, I set the grade to 70.

I subtract the designated penalty points (e.g., for failing to do the prologue or epilogue)

Lab

Writeup: 1c, greyish?

We are now hitting points in which Scheme thinks differently than humans.

    > (>= 8 1 5)
    #f
    > (>= 8 (and 10 200 2))
    #t
    > (>= 8 (and 10 2 200))
    #f