Reminders to Self
Getting started (this will be our normal start-of-class sequence)
Updated for Covid spread
Approximate overview
(define/trace proc defn) rather than (define proc defn).
Academic
Cultural
Peer
Wellness
Given the illnesses going around campus, some of you may need to attend class remotely. That’s fine, but please try not to make it your norm.
a. Let me know via email that you will not be in class.
b. You are still responsible for the work. Plan to do the lab on your own.
c. Synchronous: If you wish, you can join the Teams Meeting during class. That gives you an opportunity to hear what I say and ask me questions.
d. Asynchronous: If not, I recommend that you check the recording and the eboard. (You may want to check those anyway.)
e. Let me know if you need extra time on any assignments.
f. If you can’t be here for a quiz, you’ll need to take a makeup another week.
In part two, my-image is supposed to be an image, not a procedure.
If you’ve defined it as a procedure, change the procedure name and
define my-image in terms of that procedure. (Our intent was that
you create it first, before designing procedures, but ….)
And you must call it my-image. It helps the graders (and Sam, when
he grades).
Just in case you hadn’t noticed, there is a “rubric” at the end of the assignment. Our graders will be using that rubric to assign you a grade. It is worth reviewing them.
Can we write helper procedures to make the rainbow spaceship simpler?
Certainly. But it is not expected or required.
Where should we cite the reading?
Whatever works best for you. I care that you cite more than where you cite. If it’s best to cite by the particular code that is influenced by a reading, that’s fine. If it’s easier to just say “I consulted …” at the top, that’s fine
Do we have to cite readings and labs?
Good practice suggests that if you refer to something while working, you cite it.
These are based on what I saw at about 8pm last night. You can add more questions after I go through them.
A surprising number of you misunderstood the instructions for the numeric values reading.
“In the examples above, we gave a wide variety of examples of the
expt procedure in action. Each was intended to reveal something
different about that procedure. They were also intended to suggest
the kinds of exploration you might do when you encounter or design
a new procedure.”
“Suggest what we might be trying to reveal for each of the following. “
a. (expt 2 10.0)
Incorrect: 1024.0
Correct: We are checking what happens when the exponent is inexact. It seems that the result is also inexact.
b. (expt 2.0 10)
Incorrect: 1024.0
Correct: We are checking what happens when the base is inexact. It seems that the result is also inexact.
c. (expt 3 -5)
Incorrect: 1/243
Correct: We are checking what happens with negative exponents. It
appears that (expt x -y) is the same as (/ 1 (expt x y)).
d. (expt 4 1/2)
e. (expt 1/9 1/2)
f. (expt 2 1/2)
g. (expt 243 1/5)
This is 3.0 (inexact) rather than 3 (exact). It seems like an odd comparison to d, which was exact.
h. (expt 1+i 4)
i. (expt 1.0+i 4) `
Why are collating sequences useful?
We use collating sequences when we have to put things in order, such as organi zing books by title or author. Computers are much better at comparing numbers, so a comparison of collating sequence numbers is usually at the core of any char acter or string comparison.
Why does (char-lower-case? #\ñ) return true (#t)?
Because it’s a lowercase n with a tilde, as opposed to #\Ñ.
What do you call ǝ?
I call it schwa. I think most people do.
Why isn’t there a #\schwa?
Because the designers of Racket didn’t think it important enough to provide it.
Why does (expt 4 1/2) lead to an exact result?
It leads to an exact result because expt gives exact results when (a) the first parameter is exact, (b) the second parameter is 1/2, and (c) the first parameter has an exact square root.
Why doesn’t (expt 8 1/3) give an exact result?
That’s puzzling, isn’t it? I’m pretty sure that
exptuses a different algorithm when the parameter is 1/2 than when it’s any other exponent. For 1/2, it does the right thing for perfect squares.
<TODO: ...> with the response.From
> (remainder 8 3)
<TODO: fill in the resulting value here>
To
> (remainder 8 3)
2
If you didn’t finish, add “; SAM SAID I COULD STOP HERE” wherever you stopped.
Key idea from today: Exploring supplied procedures to understand how they work; experimentation is important. (Documentation is useful, too.)
Apology: We haven’t taught you as much about lists this semester as we normally do, so creating the
Questions:
(round 2.5)?(round 3.5)?