Fish Pond Fits a Recursive Process
"A pond has 200 fish this spring. Each spring the count is 1.5 times last spring's, minus 40 that are caught."
- Why recursive: each year comes from the previous year
, for ,
Movie Tickets Fit Steps for Calculation
"$12 per adult, $8 per child, $2 off every ticket on Tuesdays."
- Why steps: computed in stages, with a condition
- (1)
adults children - (2) If Tuesday, subtract
(adults + children) - 2 adults, 1 child, Tuesday: 24 + 8 − 6 = $26
Practice: Choose the Kind, Say Why
Name the kind, say why, write it, test an input.
- Taxi: $3.50 plus $2 per mile
- Lake: 600 fish; each year 0.9 times last year's, plus 50
- Concert: $40 a ticket; 20% off the whole order of 10+
- Library fine: $0.25 a day for 10 days, then $0.50 a day
Practice Answers: The Kind and Why
- Explicit:
; - Recursive:
, ; - Steps, condition: 12 tickets → 12(40)(0.80) = $384
- Steps, two stages: 16 days → 10(0.25) + 6(0.50) = $5.50
Lesson 2 Key Takeaways and Watch-Outs
✓ Steps with one output per input define a function
✓ The description decides: start plus constant step or factor → explicit; from the previous → recursive; stages, conditions, varying length → steps
✓ Say which kind fits and why before writing it
A function needs no single formula
Exit Task: Choose, Write, Test
A bike rental costs $8 for the first hour, $5 for each additional hour or part of an hour, and at most $30 a day.
Name the kind of definition, say why, write it, then find the cost of 3.5 hours and of 8 hours.
Exit Task Answers: Kind and Costs
- Steps: stages and a condition, with a cap
- (1) $8 for hour 1; (2) add $5 for each further hour or part of an hour; (3) if over $30, charge $30
- 3.5 hours: 8 + 5(3) = $23
- 8 hours: 8 + 5(7) = 43, so the cap gives $30
Coming Up: Combining Standard Function Types
Coming up: HSF.BF.A.1.b — Combining Standard Function Types
- Add, subtract, multiply, and divide functions
- Build models with multiple components (like: revenue minus cost equals profit)
- Identify and decompose complex real-world models