Skip to main content

CSC 151 2019S, Class 28: Vectors

Overview

  • Preliminaries
    • Notes and news
    • Upcoming work
    • Extra credit
    • Friday PSA
    • Questions
  • Quiz
  • Lab

Preliminaries

News / Etc.

  • Mentor sessions Wednesday 8-9 p.m., Thursday 8-9 p.m., Sunday 5-6 p.m.
  • The giant laurel leaf was depressing, at best. Thank you to those of you who came and tried to contribute.
  • Thanks for the good questions on the homework. I’ll work on refining it.
  • Welcome to [Anonymous], our prospective student
  • Folks should think about taking CSC 161 in the fall. It’s a great class, and you get to work with robots!

Upcoming work

  • Homework 8 due Tuesday.
  • Friday’s quiz: Pairs, Vectors
  • NO Reading for Monday:
  • Flash cards Wednesday: Pairs, Vectors
  • Lab writeup: Exercise 5

Extra Credit

I would certainly appreciate suggestions of other extra credit activities (preferably via email).

Extra credit (Academic/Artistic)

  • The Magic Flute, April 18, 7:00 p.m. Sebring-Lewis
  • Are Robots Taking Over Our Jobs? 4:15 p.m. HSSC S3325 - Large Lecture
    • On that note, please consider taking CSC 161 in the fall, you get to work with robots.

Extra credit (Peer)

  • Track and Field at Mount Mercy this coming weekend.
  • Women’s Golf at Illinois Wesleyan this coming weekend.
  • Women’s Water Polo, Saturday, at 4:00ish in the Osgood.
  • Drag Show Saturday!

Extra credit (Wellness)

  • TODAY, 4-6pm: Make fidgets. Maker lab, 927 Broad street. For more information or accommodation, contact [bernalma] or [phamanht]
  • Monday, April 15, 7:30 p.m., Harris Cinema: From the Munchies to Memory Effects: What the Science Says About Cannabis/Marijuana

Extra credit (Wellness, Regular)

  • 30 Minutes of Mindfulness at SHACS (SHAW) every Monday 4:15-4:45
  • Any organized exercise. (See previous eboards for a list.)
  • 60 minutes of some solitary self-care activities that are unrelated to academics or work. Your email reflection must explain how the activity contributed to your wellness.
  • 60 minutes of some shared self-care activity with friends. Your email reflection must explain how the activity contributed to your wellness.

Extra credit (Misc)

  • Participate in Kinetic Sculpture Competition: Saturday the 27th
    • https://bit.ly/kineticsculpture19
    • You’ll need to build your sculpture in advance.
    • You get reimbursed for up to $200 in supplies, but must present to be reimbursed.
  • Info session on KSC TODAY at 7pm at MLab.
    • Between 4th and 5th on Broad, on the West side of the street, between Jensen Optometrists and the Bike Store.
  • Public speaking workshop - April 22 at 7pm in HSSC S3325, with Kathy Clemons-Beasley ‘05. “Kathy is the Global head of Leadership and Manager Development for Blackrock and has been the speaker coach for TEDxGC.”
  • Harold Green “Clean House” Friday at 6:00 in BCC.
  • Clothing donation boxes in lounges. Donate!

Other good things

Friday PSA

  • I care about you, take care of yourselves.

Questions

Can we rely on Sam’s solution to a previous assignment in remove-duplicates?

Sure. Just cite. Sam’s solution assumes sorted, so you’ll have to sort first.

Can we use the built-in remove-duplicates?

No. Write your own.

Can we use member or member??

Yes. You can also use the contains you wrote on a recent assignment (be sure to cite yourself and your partner).

Quiz

Lab

Replace (increment ...) by (+ 1 ...).

Writeup: Exercise 5

Learning outcomes

  • Because vectors are mutable, it’s important to think about what else may refer to the same vector.

How do we recurse through vectors?

(define fun
  (lambda (vec) 
    (let kernel ([pos 0])
      (if (>= pos (vector-length vec))
          BASE-CASE
          (COMBINE (vector-ref vec pos)
                   (kernel (+ pos 1)))))))