Skip to content

Commit 0ffbf81

Browse files
committed
differences for PR #34
1 parent ed69cf4 commit 0ffbf81

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

computation_programming.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,23 @@ exercises: 10
2424

2525
*Decomposition* is crucial in any kind of problem breakdown, but especially so in programming. The computer must be told **precisely** what to do, and in what order, so problems must be broken down into discrete parts and each section coded appropriately.
2626

27-
Suppose we want to find the ten words most commonly used in a text. How might we go about that?
27+
#### Defining Inputs and Outputs
28+
29+
Before we can tell the computer *what* to do (the algorithm), we must clarify *what data* we are working with. Every computational problem involves a transformation:
30+
31+
1. **Input:** What is the starting state? What data do we have? What format is it in?
32+
2. **Output:** What is the desired goal? What should the result look like?
33+
34+
If we don't define these clearly, we cannot design effective steps to bridge the gap.
35+
36+
Suppose we want to find the ten words most commonly used in a text.
37+
38+
**Input:** A digital text file (e.g., a book chapter).
39+
**Output:** A list of the top 10 most frequent words.
40+
41+
The *process* (or algorithm) is the series of steps that turns that specific Input into that specific Output.
42+
43+
How might we go about that?
2844

2945
#### Linear code
3046

md5sum.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"episodes/intro.md" "e176eef6a3acadfca8817bf38d46bb9f" "site/built/intro.md" "2026-01-22"
99
"episodes/exercise.md" "10bf563535affd64b9d8e9c283ff8c53" "site/built/exercise.md" "2026-01-22"
1010
"episodes/computation_practice.md" "ddb122e2e242e1587011dea9aba364fb" "site/built/computation_practice.md" "2026-01-22"
11-
"episodes/computation_programming.md" "7e69751fdb0fc9d7d74fb641ae898f0a" "site/built/computation_programming.md" "2026-01-22"
11+
"episodes/computation_programming.md" "1ab7575ff080aa8e5cae77579eb08a88" "site/built/computation_programming.md" "2026-01-22"
1212
"episodes/pseudocode.md" "0ea2e3e7d977ad7245d0df4868503439" "site/built/pseudocode.md" "2026-01-22"
1313
"episodes/solutions.Rmd" "3c9c1e7239d7d5f5fc849c1d53530b5a" "site/built/solutions.md" "2026-01-22"
1414
"instructors/instructor-notes.md" "3e3dd7c81b260ed9ea96b3f927a3dbe0" "site/built/instructor-notes.md" "2026-01-22"
1515
"learners/jargon_busting.md" "28f639571863b330f8d791d02b226821" "site/built/jargon_busting.md" "2026-01-22"
1616
"learners/reference.md" "406421cb0e6eef1d001ebe4c82f0b9e2" "site/built/reference.md" "2026-01-22"
1717
"learners/setup.md" "2ce211390c1f4929a8ce5bb0479031ca" "site/built/setup.md" "2026-01-22"
1818
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2026-01-22"
19-
"renv/profiles/lesson-requirements/renv.lock" "082865a13e1fa11e1407d68151be2b6c" "site/built/renv.lock" "2026-01-22"
19+
"renv/profiles/lesson-requirements/renv.lock" "10c68775a5e7d59ff55da7b33dd51171" "site/built/renv.lock" "2026-01-22"

0 commit comments

Comments
 (0)