1 / 12

Writing Your Own Procedures

CSC 151 Sept 9 th , 2019. Writing Your Own Procedures. Agenda. Preliminaries (8:30-8:40) Quiz Debrief (8:40-8:55) Procedures (8:55-9:05) Lab Time (9:05-9:45) Wrap-up (9:45-9:50). Preliminaries (8:30-8:40). Peer Support Events

sanaa
Télécharger la présentation

Writing Your Own Procedures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSC 151 Sept 9th, 2019 Writing Your Own Procedures

  2. Agenda • Preliminaries (8:30-8:40) • Quiz Debrief (8:40-8:55) • Procedures (8:55-9:05) • Lab Time (9:05-9:45) • Wrap-up (9:45-9:50)

  3. Preliminaries (8:30-8:40) • Peer Support Events • Frisbee tournament: All day Saturday and Sunday at Middle School Fields

  4. Quiz Debrief (8:40-8:55) • Actually out of 9 • Last question was tricky/not something you’d seen, sorry!

  5. Quiz Debrief (8:40-8:55) • Flour: Input • Stir until all dry ingredients are moistened: Subroutine or Repetition • If dough sticks to rolling pin…: Conditional • Dough: Variable • Arrange the cookie dough balls…: Subroutine or Repetition

  6. Quiz Debrief (8:40-8:55) • Why is flour the input (and not dough)? • It isn’t created in the procedure, must be put in • Different cookies are created depending on the flour put in

  7. Quiz Debrief (8:40-8:55) • (* orange (- apple orange banana)) • 27 • Subtraction can take more than two arguments, works left to right (different than (reduce – 1 2 3 4))

  8. Procedures (8:55-9:05) • With your neighbor, try to recall the three different ways to create a procedure that adds 3 to a number

  9. Procedures (8:55-9:05) • Three ways to make a procedure that adds 3 to a number: • (define plus3 (o increment increment increment)) Composition • (define plus3-a (lambda (number) (+ number 3))) Lambda • (define plus3-b (section + 3 <>)) Sectioning

  10. Lab Time (9:05-9:45)

  11. Lab Time (9:05-9:45) • Write up: None! We’ll continue this lab on Wednesday

  12. Wrap-up (9:45-9:50) • Upcoming Work: • Assignment 2 due tomorrow at 10:30pm • Read about pair programming for Wednesday

More Related