EBoard 06: Conditionals

Approximate overview

  • Administrative stuff (no attendance) + Q&A [10 min]
  • Finish (or make progress on) Monday’s lab [20 min]
  • Rearrange [5 min]
  • Start conditionals lab [45 min]

Administrative stuff

Introductory Notes

  • A slightly belated Happy New Year. We wish you a year full of achievements in any aspect you wish for.
  • Sorry for the half-lab model. Sometimes such things happen. That’s why we had a pause for breath.
  • We now have Mentor Sessions scheduled
    • Sunday 4-5 pm
    • Tuesday 8-9 pm
    • Wednesday 7-8 pm
    • All in the CS commons
    • All earn tokens
  • When you have questions, I prefer that you ask them on Teams and tag me. Or ask me at the start of class. That way, both question and answer are available to everyone.
  • The three sections of our course are now slightly out of synch. That happens. No worries.
  • I apologize that our class is early in the morning. It appears to be a bad time for many of you, at least this morning.

Upcoming activities

Events

  • Mentor session tonight at 7pm.
  • Grinnellephantitis the weekend of Sep 11/12. 60 minutes suffices.
  • Feel free to suggest others that you hear about.

Upcoming work

Q&A

What should my-other-image look like?

In part two, you’ve created my-image

(define my-image (beside (circle 10 'solid 'black) (circle 20 'solid 'red)))

In part four, you’ll generalize that into a procedure called generate-my-image

(define generate-my-image (lambda (size color) (beside (circle size 'solid 'black) (circle (* 2 size) 'solid color))))

Note that you don’t have to parameterize everything.

You should then show how to generate something close to my-image using generate-my-image

(define my-other-image (generate-my-image 10 'red))

Does it matter whether we use 'red or "red" and are they the same thing?

'red is a symbol; "red" is a string. They are different things. The circle procedure (and most image procedures) generously accept either symbols or strings.

Will we always have a mini-project in play, assigned on Friday and due on Thursday?

Usually.

We have four take-home “exams”. Sets of Learning Assessments (SoLAs). The weeks you have SoLAs you do not have mini-projects.

How complex do the procedures have to be on part three?

Innovative is in the eye of the grader. Something they haven’t seen before, or that is interestingly non-trivial, or ….

Do we know who the grader is?

Nope. You never will. And it will vary.

Do we turn in the projects on Gradescope?

Yes.

Did you realize that the project is not available for submission on Gradescope?

No. I’ll look at it while you are doing lab.

Will we know the rubric for each mini-project before it is assigned?

In general, yes.

You can find the mini-projects even if they are not linked through careful study of naming conventions.

But details can change.

Do you realize that the Q&A took us about fifteen minutes, and you only budgeted five minutes?

‘eh. It happens. I’d rather you have your questions answered.

Types Lab, Continued

  • You have approximately twenty minutes to continue the lab.
  • While I hope all of you will finish, it may be that not all of you will. Those who don’t should find a time to meet again.
  • If your partner is not available, feel free to move to another group or to work on your own.

Comments

  • If you didn’t finish, set up a time to meet with your partner. But it looks like most of you were close.
  • I appreciate the supportive partner comments I hear.
    • “Good job!”
    • “No worries; let’s think it through.”
    • “You can do it.”
  • Within a string \" is one character (even though you typed two) that represents the single quotation mark.
    • In general, a backslash in a string is paired with the next character to represent a single thing.
    • \\ is the backslash character.
    • \t is the tab character.
  • Please post a question if the submit form for MP1 is still not available on Gradescope.

Rearrange

  • Yay! You get to head to a new computer.
  • Don’t forget to log out.
  • Move to your new computer.
  • Decide who logs in.
  • Start the lab.

Conditionals Lab, Initiated

  • Start the lab. Don’t expect to finish. We’ll finish on Friday.
  • Here’s a sample trace of foo
        (foo 4 5)
    --> (if (< 4 5) #t #f)
    --> (if #t #t #f)
    --> #t