ADM Python Practice • Practice 3

Production Loops & Batch Processing

Build a simulated production program that processes a batch of parts and alternates pallet destinations.

Practice Assignment

What You Need to Do

  1. Use a for loop to process six parts.
  2. Number the parts from 1 through 6 in the printed output.
  3. Route odd-numbered parts to Pallet 1 and even-numbered parts to Pallet 2.
  4. Keep separate counters for how many parts reach each pallet.
  5. Print a production summary after the loop.
  6. Then change the batch size from 6 to 10 by editing only one variable.
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

Production Loops & Batch Processing

Ready
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

  • The loop processes exactly the number stored in batch_size.
  • Each part is assigned to exactly one pallet.
  • The two pallet counters add up to the total batch size.
  • Changing only batch_size successfully changes the production run.
Submission

What to Turn In

  • Your final Python code copied into the assignment submission.
  • A screenshot of the final output showing that the program ran successfully.
  • One debugging note: identify one problem you encountered and explain how you fixed it.