EBoard 09: First set of learning assessments (SoLA)

This class will be recorded! Its use is limited to members of the class. Please do not share with others.

Approximate overview

  • General administrative stuff [~5 min]
  • Q&A [~10 min]
  • Start learning assessments

Administrative stuff

Notes and News

  • Evening tutoring will be available 3-5 p.m. Sundays and 8-10 p.m. Sundays through Thursdays in the tutoring channel on the CS team.
  • Individual tutors are also available, but we prefer that you try the evening tutors first.
  • For clarity: You can use your labs and DrRacket and the Web site when you do quizzes (and learning assessments).
  • You too can be on the CS mailing list. Just let me know.
  • You should get project 1 back some time today. Sorry for the delay in grading!
  • Good luck on the SoLA!

Upcoming activities

Attend (or watch recording) and send a one-paragraph reflection.

  • Noon, Thursday, Convocation (+1 token, more details Wednesday)
  • 5pm, Thursday, CS Extras (+1 token)

Upcoming work

Q&A

How do I get to an eboard?

Click on the day’s title in the schedule.

Go to the Handouts page and scroll to the bottom for the list.

Memorize the form of the URLs.

Set of Learning Assessment

How does the twenty-minutes / twenty-four hour thing work?

Once you open a question, you have twenty minutes to solve it.

You can choose when to open each question and in what order to do so. (E.g., you can start with tracing rather than decomposition, even though decomposition is the first listed learning objective.)

The Learning Assessments page tells you what each is about (broadly).

Mini-Project 2

I’m too lazy to look at yesterday’s eboard. Can you remind me about how I might decide whether a string contains only digits?

Sure. Use string->number. That will only succeed if the string can be converted to a number. Make sure that it’s an integer (no decimals, no imaginary). Make sure that it’s positive.

Is there a way to run a predicate on a list?

Yes. (I’ll mention it at the start of class. It will also be in tonight’s reading.)

(all pred? lst) holds only when the predicate holds for all elements of the list.

(any pred? lst) holds only when the predicate holds for at least one element of the list.

If I know that “123456789X” is valid, how do I know that “123456780X” cannot be valid?

Because the formula for computing check digits ensures that any one digit switch leads to a failure in checking. (or it should)

I did not understand the check thing.

Suppose I want to ensure that all procedures return “SamR”.

I’m going to write a procedure (check-samr val) which returns #t if val is “SamR” and raise an error otherwise. (Your goal is to write a generalized of this.)

Then I put some (check-samr ...) calls after my procedure to ensure that it works correctly. When I click “Run”, I’ll either see a bunch of #ts or some red text. If I see red text, I know that something’s wrong.

You’re going to put a bunch of (check-equals ...) calls at the end of your definitions.

    (check-equals #t (valid-isbn? "123456789X"))
    (check-equals #f (valid-isbn? "123456780X"))

How do I compute “10×1 + 9×2 + 8×3 + 7×4 + 6×5 + 5×6 + 4×7 + 3×8 + 2×9”? I think I can use two lists.

Two lists is a great idea.

For '(10 9 8 7 6 5 4 3 2), I’d use range.

We can use map to multiply the lists.

Can I see the sample code you wrote?

    ; Definitions pane
    (define multipliers (list 10 9 8 7 6 5 4 3 2))
    (define digits (list 1 2 3 4 5 6 7 8 9))
    ; Intereactions pane
    > (map * multipliers digits)
    '(10 18 24 28 30 30 28 24 18)

How do I go from a string to a list of numbers?

string->list is a good first step, but you’ll need to do more, since that gives you a list of characters.

Time to start Learning Assessments