ADM Supplemental Unit

Python Programming Crash Course

Rebuild the Python skills you need for the VEX CTE Workcell by reading, tracing, debugging, modifying, and writing realistic Workcell-style Python code. No robotic arm is required for this crash course.

How each lesson works

Learn → Check → Predict → Fix → Modify → Program

Learn It: read a short explanation tied to the VEX Workcell.

Check It: answer built-in questions and reveal the answers only after attempting them.

Predict It: trace Workcell code and predict what it would do.

Fix It: debug syntax, indentation, variable, or logic errors.

Modify It: change working code to meet a new requirement.

Program It: write a short Workcell solution independently.

Mastery Gate: confirm you can explain and apply the skill before moving on.

Interactive Code-Only Practice

Run Python in the browser

This crash course is entirely code-based. Each lesson includes an editable Python Practice Lab with Run, Reset, output, and error feedback. VEX-style arm commands are simulated as text, so no Workcell hardware is required.

Edit

Change starter code

Experiment with variables, conditions, loops, functions, and Workcell-style commands directly on the lesson page.

Run

Run Python directly on the lesson page

See printed output, simulated arm actions, and Python error messages without installing software or connecting hardware.

Recover

Reset and try again

Reset the starter code at any time. Long-running code is automatically stopped so an accidental infinite loop does not lock the lesson.

Lesson pathway

Crash Course Lessons

Work through these lessons in order. Each page is self-guided with built-in answer reveals, debugging checks, application tasks, and a mastery gate before the next lesson.

LessonTitleFocusOpen
P.1Reading Workcell PythonProgram order, comments, method calls, and predicting robot behaviorOpen Lesson
P.2Variables as Workcell SettingsVariables for coordinates, speeds, counters, and destinationsOpen Lesson
P.3Workcell Math & Coordinate OffsetsArithmetic operators and calculated robot positionsOpen Lesson
P.4Comparisons & Boolean DecisionsComparison operators and True/False conditions in automationOpen Lesson
P.5Routing with if / elif / elseDecision logic for pickup zones and pallet destinationsOpen Lesson
P.6Repeating Workcell Actions with for LoopsUsing loops to repeat predictable manufacturing actionsOpen Lesson
P.7Production Loops with whileRepeating until a production target or condition is metOpen Lesson
P.8Combining Loops + DecisionsUsing decision logic inside repeated automation cyclesOpen Lesson
P.9Functions for Reusable Workcell ActionsTurning repeated robot sequences into reusable functionsOpen Lesson
P.10Workcell Python Skills ChallengeIntegrating variables, decisions, loops, and functions in one automation programOpen Lesson
Practice Assignments

Apply the Python Skills

Complete these short assignments as you move through the crash course. Each assignment includes an interactive browser Python lab and requires no physical Workcell.

Practice 1 • 10 pts

Coordinate Setup & Variable Control

Use after P.1–P.3. Practice variables, coordinate math, and configurable movement code.

Open Practice 1
Practice 2 • 10 pts

Part Inspection & Routing Logic

Use after P.4–P.5. Practice comparisons, Boolean logic, and if/elif/else routing.

Open Practice 2
Practice 3 • 10 pts

Production Loops & Batch Processing

Use after P.6–P.8. Practice loops, counters, and repeated production decisions.

Open Practice 3
Practice 4 • 10 pts

Reusable Pick-and-Place Functions

Use after P.9. Turn repeated movement sequences into reusable functions.

Open Practice 4
Practice 5 • 10 pts

Workcell Programming Mini-Challenge

Use after P.10. Integrate variables, loops, decisions, functions, validation, and production tracking.

Open Practice 5
Core VEX Methods

Workcell movement code

arm.move_to(x, y, z) and arm.move_inc(x, y, z) appear as realistic code examples for students to read, correct, and write.

End Effector

Magnet control

Practice uses arm.set_end_effector_magnet(True/False) as a code context for part handling; students do not operate the physical end effector.

Reference

VEX CTE Python API

Use the official API when you need to check command names, arguments, or behaviors.

Open VEX API