0
0
Drone Programmingprogramming~30 mins

Pre-flight checklist automation in Drone Programming - Mini Project: Build & Apply

Choose your learning style9 modes available
Pre-flight checklist automation
📖 Scenario: You are preparing a drone for flight. To ensure safety, you need to check several important systems before takeoff. Automating this checklist helps avoid mistakes and saves time.
🎯 Goal: Build a simple program that stores the drone's system checks, sets a threshold for passing, filters which checks passed, and then displays the final list of passed checks.
📋 What You'll Learn
Create a dictionary called system_checks with exact keys and values for system names and their status scores
Create a variable called pass_threshold with the exact value 75
Use a dictionary comprehension called passed_checks to include only systems with scores greater than or equal to pass_threshold
Print the passed_checks dictionary exactly as shown
💡 Why This Matters
🌍 Real World
Automating pre-flight checks helps drone operators quickly verify that all important systems are ready, improving safety and efficiency.
💼 Career
Knowledge of filtering data and using dictionary comprehensions is useful for software developers working on automation, robotics, or embedded systems.
Progress0 / 4 steps
1
Create the system checks dictionary
Create a dictionary called system_checks with these exact entries: 'Battery': 80, 'Motors': 90, 'Sensors': 70, 'GPS': 85, 'Camera': 60
Drone Programming
Need a hint?

Use curly braces {} to create the dictionary with the exact keys and values.

2
Set the pass threshold
Create a variable called pass_threshold and set it to the integer 75
Drone Programming
Need a hint?

Just assign the number 75 to the variable pass_threshold.

3
Filter passed system checks
Use a dictionary comprehension called passed_checks to include only the systems from system_checks where the score is greater than or equal to pass_threshold
Drone Programming
Need a hint?

Use {system: score for system, score in system_checks.items() if score >= pass_threshold} to filter.

4
Display the passed checks
Print the passed_checks dictionary exactly as it is
Drone Programming
Need a hint?

Use print(passed_checks) to show the filtered dictionary.