computer_science
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computer_science [2021/09/16 01:31] – [Case study: addition] mana | computer_science [2021/09/25 05:27] (current) – mana | ||
---|---|---|---|
Line 41: | Line 41: | ||
- | ===== Algorithm ===== | ||
- | ==== Design ==== | ||
- | * Step 1: Do something | ||
- | * Step 2: Do something | ||
- | * Step 3: Do something | ||
- | * ... : ... | ||
- | ==== Sequential steps ==== | ||
- | A sequential step is a single task; for example '' | ||
- | ==== Conditional steps ==== | ||
- | Ask a question that is answered with a logic answer. The answer can be '' | ||
- | For example: | ||
- | < | ||
- | if (x > 0) add 1 to x | ||
- | else substract 1 from x | ||
- | </ | ||
- | |||
- | ==== Loops ==== | ||
- | Iterative steps. | ||
- | < | ||
- | add 1/2 cup to mixture | ||
- | while mixture is dry | ||
- | </ | ||
- | |||
- | ==== Recursion ==== | ||
- | FIXME (This will be filled at a later point.) | ||
- | |||
- | ==== Case study: addition ==== | ||
- | Example: | ||
- | |||
- | < | ||
- | 472 | ||
- | +593 | ||
- | </ | ||
- | |||
- | ---- | ||
- | FIXME | ||
- | Conceptualise: | ||
- | < | ||
- | Let m => 1 be number of digits | ||
- | |||
- | a a a a | ||
- | < | ||
- | </ |
computer_science.1631723467.txt.gz · Last modified: 2021/09/16 01:31 by mana