From a048303540bd6dfb0994371ed6dd9d4ed5cccedf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:48:12 +0000 Subject: [PATCH 1/2] Initial plan From 1485ec4afe6d5bab4e8f4725ff32c6bdab8851c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:50:48 +0000 Subject: [PATCH 2/2] Add drone-themed variables and data types example Co-authored-by: anjrew <26453863+anjrew@users.noreply.github.com> --- 01_variables_and_data_types.py | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 01_variables_and_data_types.py diff --git a/01_variables_and_data_types.py b/01_variables_and_data_types.py new file mode 100644 index 0000000..9a3cfb1 --- /dev/null +++ b/01_variables_and_data_types.py @@ -0,0 +1,41 @@ +""" +Variables and Data Types - Drone Example +========================================== +This example demonstrates different data types using a drone scenario +from RobotX Workshops. +""" + +# Integer: Used for whole number values +# altitude_meters represents the drone's altitude in meters +# We use an integer because altitude is typically measured in whole meters +# Example: 15 meters, 50 meters, 100 meters +altitude_meters = 50 +print(f"Drone altitude: {altitude_meters} meters") + +# Float: Used for decimal/precise numerical values +# battery_voltage represents the drone's battery voltage +# We use a float because voltage requires precision with decimal points +# Example: 12.6V, 11.4V, 10.8V +battery_voltage = 12.6 +print(f"Battery voltage: {battery_voltage}V") + +# String: Used for text data +# drone_model represents the name/model of the drone +# We use a string because model names contain text characters +# Example: "DJI Mavic", "Parrot Anafi", "Custom Quadcopter" +drone_model = "DJI Mavic Air 2" +print(f"Drone model: {drone_model}") + +# Boolean: Used for true/false states +# is_armed indicates whether the drone motors are armed and ready for flight +# We use a boolean because the drone can only be armed (True) or disarmed (False) +# This is critical for safety - motors won't spin when False +is_armed = False +print(f"Drone armed status: {is_armed}") + +# Display all variables together +print("\n--- Drone Status Summary ---") +print(f"Model: {drone_model}") +print(f"Altitude: {altitude_meters} meters") +print(f"Battery: {battery_voltage}V") +print(f"Armed: {is_armed}")