Add robotics-focused data structures examples to 04_data_structures.py #5
+24
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements robotics-focused data structure examples for the Python coding examples template, making the content more relevant and engaging for RobotX Workshops students.
Changes Made
Created
04_data_structures.py
with practical robotics examples:Flight Path List Example
flight_path
list containing coordinate tuples representing waypoints:[(0, 0), (5, 10), (10, 10)]
for
loop that iterates through and prints each waypoint in a clear, formatted mannerSensor Readings Dictionary Example
sensor_readings
dictionary with realistic robotics sensor data:"gyro"
: 0.05 (rad/s)"accel"
: 9.81 (m/s²)"temp"
: 25.3 (°C)"accel"
) valueExample Output
These examples help students understand how Python data structures can be applied to real-world robotics scenarios like mission planning and sensor data management.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.