0
0
Drone Programmingprogramming~30 mins

Inspection of infrastructure in Drone Programming - Mini Project: Build & Apply

Choose your learning style9 modes available
Inspection of Infrastructure
📖 Scenario: You are programming a drone to inspect a set of infrastructure points such as bridges, towers, and pipelines. The drone needs to check each point's status and decide if it requires maintenance based on a damage score.
🎯 Goal: Build a simple program that stores infrastructure points with their damage scores, sets a damage threshold, filters points that need maintenance, and prints the list of points requiring maintenance.
📋 What You'll Learn
Create a dictionary with infrastructure points and their damage scores
Set a damage threshold value
Use a loop or comprehension to find points needing maintenance
Print the list of points that require maintenance
💡 Why This Matters
🌍 Real World
Drones inspecting infrastructure help find problems early to keep bridges, towers, and pipelines safe.
💼 Career
This project shows how to process sensor data and make decisions, skills useful for drone programming and maintenance automation jobs.
Progress0 / 4 steps
1
Create infrastructure data
Create a dictionary called infrastructure with these exact entries: 'Bridge A': 3, 'Tower B': 7, 'Pipeline C': 5, 'Bridge D': 2, 'Tower E': 8
Drone Programming
Need a hint?

Use curly braces {} to create a dictionary with keys as point names and values as damage scores.

2
Set damage threshold
Create a variable called damage_threshold and set it to 5
Drone Programming
Need a hint?

Just assign the number 5 to the variable damage_threshold.

3
Find points needing maintenance
Create a list called needs_maintenance that contains the names of points from infrastructure where the damage score is greater than damage_threshold. Use a list comprehension with point and score as variables in for point, score in infrastructure.items()
Drone Programming
Need a hint?

Use a list comprehension to check each score and include the point if the score is greater than damage_threshold.

4
Print points needing maintenance
Write a print statement to display the list needs_maintenance
Drone Programming
Need a hint?

Use print(needs_maintenance) to show the points that need maintenance.