From 86126d99e3a823006ab0746372ad9677c08e14f6 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:25 +0000 Subject: [PATCH 1/2] Initial plan From 95085db473dd329f73dba42ccf5095a50d2d0cdd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:51:36 +0000 Subject: [PATCH 2/2] Add drone pre-flight check scenario to 02_control_flow.py Co-authored-by: anjrew <26453863+anjrew@users.noreply.github.com> --- 02_control_flow.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 02_control_flow.py diff --git a/02_control_flow.py b/02_control_flow.py new file mode 100644 index 0000000..57e6bc9 --- /dev/null +++ b/02_control_flow.py @@ -0,0 +1,15 @@ +""" +Control Flow Example: Drone Pre-Flight Check +This example demonstrates if-elif-else statements using a practical robotics scenario. +""" + +# Drone pre-flight check scenario +battery_percentage = 80 # Example value - you can change this to test different conditions + +# Check battery level and provide flight recommendation +if battery_percentage < 25: + print("Warning: Battery critically low. Do not fly.") +elif battery_percentage <= 75: + print("Battery OK for short flight.") +else: + print("Battery optimal. Ready for flight.")