Think in Python / CORE PATH
Run a program
A program is an ordered set of instructions with observable output.
A query returns rows; a script can coordinate several steps around those rows.
Understand the idea
A program is an ordered set of instructions with observable output. A query returns rows; a script can coordinate several steps around those rows.
Work through the practice with a tiny fixture, predict the result before running it, and record one boundary case. Use the exit check as evidence before moving on.
What to learn
- Run a .py file and use print for visible output.
- Distinguish source code from the interpreter that executes it.
- Predict the output before running the program.
A small original example
def pipeline_message(stage, rows):
return f"{stage}: {rows} rows"
print(pipeline_message("landing", 4))Practice on your own data
Task 01: format a short pipeline completion message.
Practice this lesson in the Python lab →
pipeline_message("landing", 4) returns "landing: 4 rows".
Common pitfalls
- Returning a value and printing a value have different effects.
Prerequisites
Video and playlist companions
Choose one explanation for the concept, then attempt the practice. These are topic mappings, not a claim that every linked lesson covers every outcome.
Boot.dev · Python for Beginners
Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.
كورس Python منحة ITI
Loads YouTube on request. Open on YouTube ↗ if the owner restricts embedding.
Sources and further reading
- Boot.dev · Python for Beginners ↗User-selected YouTube course
- كورس Python منحة ITI ↗User-selected ITI playlist
- Harvard CS50P · lectures & problem sets ↗User-selected HarvardX CS50P course
- Python language tutorial ↗Official documentation
Track progress on this topic → · Markdown source ↗