dx and dy
Short names for the change in x and the change in y, the distance a shape moves across and down in one step.
In more detail
d comes from delta, the mathematical sign for a change. move(dx, dy) shifts a shape by that amount, and reversing dx or dy makes a bouncing ball change direction at a wall.
Related terms
- move() — The graphics.py method that shifts a drawn shape by dx pixels across and dy pixels down.
- animation — Making shapes appear to move by redrawing them in slightly different places many times a second.
- coordinates — A pair of numbers, x across and y down or up, that gives a position in a window.
Taught in
- Reading The graphics.py Documentation — Hands-on Python: Complete Video Course & Book
- Animation: Moving One Shape — Hands-on Python: Complete Video Course & Book
- Animation: Loops, Bouncing, Flushing — Hands-on Python: Complete Video Course & Book
- Nesting Control Flow Statements — Hands-on Python: Complete Video Course & Book
- Graphical Applications With While — Hands-on Python: Complete Video Course & Book