liveBook · Manning

Dependency

As explained in Get Programming: Learn to code with Python

Task dependency is a relationship in which one task cannot begin until another task has completed.

A task depends on another task when it cannot start until that task is complete. Independent tasks can happen at the same time. section 20.1

Ordering an item online

Extract the order details first. Then finding the item and making a shipping label can happen independently. Packing depends on finding the item; sending depends on both packing and the label. section 20.1

Figure 20.1. One possible way to divide the task of ordering an item online into smaller, self-contained, and reusable subtasks. Each gray box represents a task. Things to the left of the box are the inputs to a task, and things to the right are outputs of the task.

See how an online order can be divided into subtasks, with each task’s inputs and outputs shown. section 20.1

How Get Programming: Learn to code with Python covers it

How deep it goes
Defines dependency and independence, then traces prerequisites through an online-order workflow without showing code.
Examples
Uses an online order to show dependent and independent subtasks, and asks readers to classify everyday situations.
What you can do after
Evaluate task order by identifying which subtasks require earlier tasks to finish.
How it connects
Links task dependency to task decomposition, task independence, and abstraction.

Also explained in

Compare how 27 books explain dependency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Get Programming: Learn to code with Python. The section links point to the parts of the book it draws on.