- Create a function named
pick_part(x, y, z). - Create a function named
place_part(x, y, z). - Each function must use a safe travel height before moving down.
- The pick function must turn the magnet ON; the place function must turn it OFF.
- Call the functions to move two simulated parts between different coordinates.
- Do not duplicate the full movement sequence outside the functions.
ADM Python Practice • Practice 4
Reusable Pick-and-Place Functions
Turn repetitive simulated movement sequences into reusable functions.
Practice Assignment
What You Need to Do
Browser Python Lab
Build and Test Your Program
Modify the starter code until all required behaviors work. No physical Workcell is needed.
Interactive Python Practice
Reusable Pick-and-Place Functions
Editable Python Code
Output & Errors
Predict what will happen, then click Run Code.
Tip: Press Ctrl+Enter (Cmd+Enter on Mac) to run. The mock arm prints simulated Workcell actions instead of controlling hardware.
Success Criteria
Check Your Work
Submission
