- Create variables for part_height, minimum_height, maximum_height, and destination.
- Create a Boolean expression that determines whether the part height is acceptable.
- If the part is acceptable, route destination 1 to Pallet 1 and destination 2 to Pallet 2.
- If the destination is invalid, print an error message.
- If the part fails inspection, route it to a reject location instead of a pallet.
ADM Python Practice • Practice 2
Part Inspection & Routing Logic
Write decision logic that determines whether a part passes inspection and where it should be routed.
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
Part Inspection & Routing Logic
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
