Learning Targets
- Use +, -, *, and / with variables
- Create coordinate offsets
- Use calculations to reduce repeated hard-coded values
Arithmetic operators and calculated robot positions.
Use +, -, *, and / with variables Create coordinate offsets Use calculations to reduce repeated hard-coded values
For the online work: a browser and your engineering notebook. Follow the activity’s materials list for any physical build, and get teacher approval before using equipment.
Suggested work block: 45–60 minutes. Physical builds and projects may span several classes; follow your teacher’s schedule.
Python can calculate robot positions instead of requiring every coordinate to be typed manually. This is useful when pickup locations are evenly spaced or when you need a safe height above a part.
For example, safe_z = pickup_z + safe_offset creates a safe approach position above the pickup height.
Calculated coordinates reduce mistakes and make patterns easier to adjust.
Read every line and predict what the program would do before opening the practice check.
pickup_x = 100
pickup_y = 150
pickup_z = 45
safe_offset = 75
safe_z = pickup_z + safe_offset
arm.move_to(pickup_x, pickup_y, safe_z)
arm.move_to(pickup_x, pickup_y, pickup_z)Rule: If you missed more than one question, reread Learn It and trace the example again before continuing.
What value is stored in safe_z? Where will the arm move first?
Do first: Write your answer in your engineering notebook.
safe_z is 120. The arm first moves to (100, 150, 120).
Find and correct every error before opening the answer.
part_spacing = 40
first_x = 80
second_x = first_x + part_spcingCorrect the misspelled variable: second_x = first_x + part_spacing.
Create a third pickup x-coordinate that is two part spacings away from the first position.
Evidence: Paste the revised code into your engineering notebook.
Build coordinate variables for three equally spaced pickup locations using one starting coordinate and one spacing variable.
Edit the code, predict the output, then click Run Code. No physical Workcell is connected.
Predict what the code will do, then click Run Code.
Tip: Press Ctrl+Enter (Cmd+Enter on Mac) to run. The mock arm object prints simulated Workcell actions instead of controlling hardware.
Without looking back at Learn It, answer these in your notebook:
A strong response names the Python idea accurately, connects it to a specific Workcell action or decision, and identifies a realistic syntax or logic error from this lesson.
Move on only when you can check every statement. If one is still uncertain, revisit the worked example or redo Fix It before continuing.
Use the official VEX API only as a programming reference to verify method names and parameters. The examples use the configured arm name arm. No physical Workcell is required.
Submit the evidence specified in the activity and your classroom assignment. The report below collects your notes, calculations, observations, and reflections; attach any required drawings, photos, CAD, or code separately.
A PDF download is not a submission. Review it, then upload it and any required attachments through your classroom assignment system.