playing computer
Following a program by hand, one statement at a time, writing down every variable's value in a table as it changes.
In more detail
Playing computer shows exactly what the code does rather than what you meant, which is how you find logic errors. Record each line executed, the variables it changes and any output, and follow calls into functions and back. The debugger automates the same idea.
Related terms
- 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.
- logic error — A mistake that lets a program run without any error message but makes it produce the wrong result.
- debugging — Finding and fixing the cause of a bug, by observing what the program actually does and comparing it with what it should do.
Taught in
- Lists, Range And The For Loop — Hands-on Python: Complete Video Course & Book
- Repeat Loops And Successive Modification — Hands-on Python: Complete Video Course & Book
- Accumulation Loops — Hands-on Python: Complete Video Course & Book
- Playing Computer — Hands-on Python: Complete Video Course & Book
- Chapter One In One Sitting — Hands-on Python: Complete Video Course & Book