flow of control
The order in which a program's statements actually run, which jumps into functions, round loops and past if branches rather than going straight down the page.
In more detail
A call jumps to the function body and comes back to the caller when the body ends or returns. Execution order is not text order: a def near the top runs its body only when called later. Following the flow of control by hand is the heart of playing computer.
Related terms
- function call — Running a function by writing its name followed by parentheses holding any arguments.
- playing computer — Following a program by hand, one statement at a time, writing down every variable's value in a table as it changes.
- if statement — A statement that runs a block of code only when a condition holds, optionally with an else block for when it does not.
- for loop — A loop that runs its body once for each item in a list or other collection, setting a loop variable to the current item.
Taught in
- Defining Your First Function — Hands-on Python: Complete Video Course & Book
- Several Functions, And Flow Of Control — Hands-on Python: Complete Video Course & Book
- Repeat Loops And Successive Modification — Hands-on Python: Complete Video Course & Book
- Thirty Questions, One Sneaky Print — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Forty Minutes, Thirty Items: How PCEP Is Run — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Fundamentals Sprint — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Nested Loops, Traced By Hand — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Control Flow Sprint — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Twelve Traps, One Shape Each — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Mock, Review And Exam Day — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep