computer_basics:structured_programming_concepts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computer_basics:structured_programming_concepts [2018/07/24 01:06] – [Control flow] mithat | computer_basics:structured_programming_concepts [2018/07/24 22:13] (current) – [Practical reasons] mithat | ||
---|---|---|---|
Line 14: | Line 14: | ||
===== What is it? ===== | ===== What is it? ===== | ||
* A way of thinking about how to create computer programs: a **paradigm**. | * A way of thinking about how to create computer programs: a **paradigm**. | ||
- | * Developed in the late 1950s to help create manageable computer programs. | + | * Developed in the 1950s to help create manageable computer programs. |
===== Why is it important? ===== | ===== Why is it important? ===== | ||
Line 21: | Line 21: | ||
===== Theoretical reasons ===== | ===== Theoretical reasons ===== | ||
- | * It's is all you need to write any " | + | * It's is all you need to write any " |
* Dominates theoretical thinking. | * Dominates theoretical thinking. | ||
===== Practical reasons ===== | ===== Practical reasons ===== | ||
- | * Many popular | + | * Popular |
* Influences languages built around other paradigms. | * Influences languages built around other paradigms. | ||
* Thinking " | * Thinking " | ||
Line 44: | Line 44: | ||
===== Scenario ===== | ===== Scenario ===== | ||
* I need to leave my house for a couple days. | * I need to leave my house for a couple days. | ||
- | * My friend has agreed to look after my cat Zoë. | + | * My friend has agreed to look after my cat Ash. |
* They need detailed instructions. | * They need detailed instructions. | ||
===== First try ===== | ===== First try ===== | ||
- | //Zoë gets a cup of food every day.\\ | + | //Ash gets a cup of food every day.\\ |
Her water needs to be filled if it's running low.\\ | Her water needs to be filled if it's running low.\\ | ||
She also needs to play fetch with her favorite toy.// | She also needs to play fetch with her favorite toy.// | ||
===== Sequence ===== | ===== Sequence ===== | ||
- | "Zoë gets a cup of food every day." | + | "Ash gets a cup of food every day." |
open the bag of catfood on the counter | open the bag of catfood on the counter | ||
Line 70: | Line 70: | ||
"She also needs to play fetch with her favorite toy." | "She also needs to play fetch with her favorite toy." | ||
- | toss | + | toss |
- | while Zoë brings it back | + | while Ash brings it back |
pat her on the head | pat her on the head | ||
- | toss Zoë's favorite toy | + | toss Ash's favorite toy |
===== Code Examples ===== | ===== Code Examples ===== | ||
Line 104: | Line 104: | ||
</ | </ | ||
+ | < | ||
+ | < | ||
+ | for(var i=0, | ||
+ | </ | ||
+ | </ |
computer_basics/structured_programming_concepts.1532394399.txt.gz · Last modified: 2018/07/24 01:06 by mithat