CSC 151.03, Class 09: Tables and compound data
Overview
- Preliminaries
- Notes and news
- Upcoming work
- Extra credit
- Questions
- Lab
- Debrief
News / Etc.
- I will distribute answer keys for homework 3 on Thursday night. (Some of you asked for extensions until then.)
- I do not yet have my grading system up and running. When I do, I will distribute grades. Until then, I cannot.
- There’s a lot in today’s lab, so I’ll try not to do too many preliminaries.
- I should have a draft code of conduct for Friday’s class.
- Mentor sessions tonight at 8 and tomorrow at 7 and 8.
Upcoming Work
- Writeup for class 8 due TONIGHT at 10:30 p.m.
- To: csc151-03-grader@grinnell.edu
- Subject: CSC 151.03 Writeup 8 (YOUR NAMES)
- Writeup for class 9 due Friday at 10:30 p.m.
- Exercises: TBD
- To: csc151-03-grader@grinnell.edu
- Subject: CSC 151.03 Writeup 9 (YOUR NAMES)
- Read: Reading data from files for Friday’s class.
- Quiz Friday
- Documentation
- Testing
- Tables
- Flash cards for week 3 due TONIGHT
at 8 p.m.
- To: csc-151-03-grader@grinnell.edu
- Subject: CSC 151.03 Flash Cards Week 3 (YOUR NAME)
- Exam 1 distributed
- Prologue due Friday night
- Exam due Tuesday night
- Cover sheet due Wednesday in class
- Epilogue due Wednesday night
Extra credit (Academic)
- CS Extras, Thursday at 4:15 p.m. in 3821: Caldron: A UI for CRNs.
Extra credit (Peer)
None at the moment.
Extra Credit (Misc)
None at the moment.
Other Good Things
- Men’s Soccer vs. Buena Vista, Sept. 17 at 2:00 p.m.
- Women in Computing, TONIGHT at 7:00 p.m. in the CS commons.
Questions
- What is a helper procedure?
- Any extra procedure you write to help you write the primary procedure more clearly, efficiently, easily, …
Lab
- I’m worried about that entry that does not have numbers.
- You should be worried.
- We’ll deal with the issue in problems 3 and 4; it won’t matter for 1 and 2.
- Any overall hints?
- Focus on individual entries first. Then think about how to generalize for the list.
- “I want to compare two entries” not “I want to compare any two entries in the list.”
- “I want to transform one entry” not “I want to transform every entry in the list.”
- Any hints on problem 2?
- Remember that you should figure out how to transform one element first.
- I would build three lists and append them together in the right order.
-
- The first three elements (use
take)
- The first three elements (use
-
- The next two elements (use
takeanddrop)
- The next two elements (use
-
- The last element (use
drop)
- The last element (use
- You could also grab each element using
list-refand then shove them back together usinglist. - How many
a’s andd’s can I have in things likecadddr? - Four
- What if I want
caddddr? - There are lots of options.
(define caddddr (section list-ref <> 4))(define caddddr (o car cddddr))(define caddddr (o car cdr cdr cdr cdr))- Oh, I could just use
list-ref, couldn’t I? - Yes.
Debrief
Next class.