7
Lesson 7 of 20 ยท Cause & Effect
Cause & Effect โ Part 15
When I do this, that happens. Actions cause results. This is part 15 of 20.
What you'll learn
You will understand that code (cause) produces output (effect), and changing the code changes the result.
Steps
- 1In coding, every action has a result. When the computer reads print(), the action is 'show text' and the result is the message on screen.
- 2If we changed the message inside print(), the action stays the same (show text) but the result changes (different text).
- 3This is cause and effect: the CODE is the cause, the OUTPUT is the effect.
- 4Every line of code you write causes something to happen. Understanding this helps you predict what your code will do!
Key Terms
- Cause
- The code you write โ it tells the computer what to do.
- Effect
- What happens as a result (e.g. text appears on screen).
- Output
- The result that a program produces โ what you see on screen.
Python 3
Output
Loading Python... This may take a few seconds.
Your code runs only in your browser. No code is sent to any server. Stay safe and have fun learning!
๐จ๏ธView in Shop
Checkout complete lesson on Cause & Effect for Kindergarten
Get the full Cause & Effect track as a printable PDF โ all lessons, worksheets, and answer keys.
