Challenge - 5 Problems
Infrastructure Inspection Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Drone Path Calculation Output
What is the output of the following drone path calculation code snippet?
Drone Programming
path = [(0,0), (1,2), (3,5), (6,8)] total_distance = 0 for i in range(len(path)-1): x1, y1 = path[i] x2, y2 = path[i+1] dist = ((x2 - x1)**2 + (y2 - y1)**2)**0.5 total_distance += dist print(round(total_distance, 2))
Attempts:
2 left
💡 Hint
Calculate the distance between each consecutive point and sum them.
✗ Incorrect
The code calculates the Euclidean distance between each pair of consecutive points and sums them. The distances are approximately 2.24, 3.61, and 3.61, totaling about 9.46, rounded to 9.46.
🧠 Conceptual
intermediate1:30remaining
Understanding Drone Sensor Data Processing
Which option best describes how a drone processes sensor data to detect structural cracks during inspection?
Attempts:
2 left
💡 Hint
Think about how drones use cameras and software to analyze structures.
✗ Incorrect
Drones typically use cameras and image recognition software to detect cracks by analyzing photos or video frames. Manual inspection or ignoring sensor data is not automated drone behavior.
🔧 Debug
advanced1:30remaining
Fix the Drone Battery Check Logic
What error does the following drone battery check code raise when executed?
Drone Programming
battery_level = 15 if battery_level < 20 print("Battery too low for inspection flight.") else: print("Battery level sufficient.")
Attempts:
2 left
💡 Hint
Check the syntax of the if statement.
✗ Incorrect
The if statement is missing a colon at the end of the condition line, causing a SyntaxError.
📝 Syntax
advanced1:30remaining
Identify the Correct Drone Command Syntax
Which option shows the correct syntax to command a drone to hover at 10 meters altitude for 5 seconds?
Attempts:
2 left
💡 Hint
Look for proper function call syntax with named parameters.
✗ Incorrect
Option C uses correct Python function call syntax with named arguments and proper commas. Other options have syntax errors or invalid parameter formats.
🚀 Application
expert2:30remaining
Calculate Number of Inspection Points
A drone inspects a bridge by taking photos every 3 meters along a 120-meter span. It also takes 2 photos at each end for detailed views. How many photos does the drone take in total?
Attempts:
2 left
💡 Hint
Divide the span by the photo interval, then add the extra photos at the ends.
✗ Incorrect
The drone takes photos every 3 meters: 120 / 3 = 40 intervals, so 41 points including start and end. Adding 2 extra photos at each end adds 4 more photos. Total = 41 + 4 = 45. But since the 2 photos at each end replace the normal photo at those points, total photos = 41 + 2 + 2 - 3 (to avoid double counting) = 42.