Bird
Raised Fist0
Drone Programmingprogramming~30 mins

Career opportunities in drone technology in Drone Programming - Mini Project: Build & Apply

Choose your learning style10 modes available
Career Opportunities in Drone Technology
📖 Scenario: You are working for a drone company that wants to organize information about different career roles in drone technology. Each role has a name and a brief description of what it involves.
🎯 Goal: You will create a dictionary to store drone career roles and their descriptions, set a filter to find roles related to a specific keyword, extract those roles using a dictionary comprehension, and finally display the filtered roles.
📋 What You'll Learn
Create a dictionary called drone_careers with exact role-description pairs
Create a variable called keyword with the exact string to filter roles
Use a dictionary comprehension to create filtered_careers with roles whose descriptions contain the keyword
Print the filtered_careers dictionary
💡 Why This Matters
🌍 Real World
Organizing and filtering career information helps companies and job seekers find relevant roles in drone technology.
💼 Career
Understanding how to manage and filter data structures is important for roles in software development and data analysis within the drone industry.
Progress0 / 4 steps
1
Create the drone careers dictionary
Create a dictionary called drone_careers with these exact entries: 'Drone Pilot': 'Operates drones for various missions', 'Drone Engineer': 'Designs and builds drone hardware', 'Data Analyst': 'Analyzes data collected by drones', 'Software Developer': 'Develops software for drone control', 'Maintenance Technician': 'Maintains and repairs drones'.
Drone Programming
Hint

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

2
Set the keyword to filter careers
Create a variable called keyword and set it to the string 'drone' (all lowercase).
Drone Programming
Hint

Assign the exact string 'drone' to the variable keyword.

3
Filter careers using dictionary comprehension
Use a dictionary comprehension to create a new dictionary called filtered_careers that includes only the roles and descriptions from drone_careers where the keyword appears in the description (case insensitive). Use for role, desc in drone_careers.items() and check if keyword is in desc.lower().
Drone Programming
Hint

Use a dictionary comprehension with for role, desc in drone_careers.items() and check if keyword is in desc.lower().

4
Display the filtered careers
Write a print statement to display the filtered_careers dictionary.
Drone Programming
Hint

Use print(filtered_careers) to show the filtered dictionary.

Practice

(1/5)
1. Which of the following is a common career opportunity related to drone programming?
easy
A. Developing software to control drone flight paths
B. Designing drone packaging materials
C. Selling drone insurance policies
D. Writing drone user manuals

Solution

  1. Step 1: Understand drone programming roles

    Drone programming involves creating software that controls drones, such as flight paths and sensors.
  2. Step 2: Identify the option related to programming

    Developing software to control drone flight paths describes developing software for drone flight, which matches drone programming.
  3. Final Answer:

    Developing software to control drone flight paths -> Option A
  4. Quick Check:

    Drone programming = software development [OK]
Hint: Look for software-related tasks in drone careers [OK]
Common Mistakes:
  • Confusing hardware roles with programming
  • Choosing options unrelated to software
  • Ignoring the programming focus
2. Which of these is the correct syntax to define a function in a drone programming script using Python?
easy
A. function flyDrone():
B. define flyDrone()
C. func flyDrone()
D. def flyDrone():

Solution

  1. Step 1: Recall Python function syntax

    In Python, functions are defined using the keyword def followed by the function name and parentheses.
  2. Step 2: Match options to Python syntax

    def flyDrone(): uses def flyDrone():, which is correct Python syntax.
  3. Final Answer:

    def flyDrone(): -> Option D
  4. Quick Check:

    Python function = def [OK]
Hint: Python functions start with 'def' keyword [OK]
Common Mistakes:
  • Using 'function' like JavaScript
  • Using 'func' or 'define' which are invalid in Python
  • Missing colon at the end
3. What will be the output of this Python code snippet used in drone programming?
commands = ['takeoff', 'forward', 'left', 'land']
for i, cmd in enumerate(commands):
    print(f"Step {i+1}: {cmd}")
medium
A. Step 1: takeoff\nStep 2: forward\nStep 3: left\nStep 4: land
B. Step 0: takeoff\nStep 1: forward\nStep 2: left\nStep 3: land
C. Step 1: takeoff\nStep 2: forward\nStep 3: left
D. Error: enumerate not defined

Solution

  1. Step 1: Understand enumerate usage

    enumerate(commands) returns pairs of (index, command) starting at 0.
  2. Step 2: Analyze print statement

    Print uses i+1 for step number, so steps start at 1, printing all commands.
  3. Final Answer:

    Step 1: takeoff\nStep 2: forward\nStep 3: left\nStep 4: land -> Option A
  4. Quick Check:

    Index + 1 = step number [OK]
Hint: Remember enumerate starts at 0; add 1 for human count [OK]
Common Mistakes:
  • Forgetting to add 1 to index
  • Missing last command in output
  • Assuming enumerate causes error
4. Identify the error in this drone programming Python code snippet:
def start_drone()
    print("Drone started")
start_drone()
medium
A. Indentation error in print statement
B. Incorrect function call syntax
C. Missing colon ':' after function definition
D. Missing parentheses in print function

Solution

  1. Step 1: Check function definition syntax

    Python requires a colon ':' after the function header line.
  2. Step 2: Verify other syntax elements

    Function call and print statement are correct; parentheses in print are present.
  3. Final Answer:

    Missing colon ':' after function definition -> Option C
  4. Quick Check:

    Function header needs ':' [OK]
Hint: Function headers always end with ':' in Python [OK]
Common Mistakes:
  • Ignoring missing colon
  • Thinking print needs parentheses removed
  • Assuming indentation is wrong
5. You want to create a dictionary in Python that maps drone model names to their maximum flight time in minutes. Which code correctly creates this dictionary for models 'Alpha' (30 min), 'Beta' (45 min), and 'Gamma' (25 min)?
hard
A. drone_times = {'Alpha' -> 30, 'Beta' -> 45, 'Gamma' -> 25}
B. drone_times = {'Alpha': 30, 'Beta': 45, 'Gamma': 25}
C. drone_times = ('Alpha' = 30, 'Beta' = 45, 'Gamma' = 25)
D. drone_times = ['Alpha': 30, 'Beta': 45, 'Gamma': 25]

Solution

  1. Step 1: Recall Python dictionary syntax

    Dictionaries use curly braces with key:value pairs separated by commas.
  2. Step 2: Check each option's syntax

    drone_times = {'Alpha': 30, 'Beta': 45, 'Gamma': 25} uses correct syntax with curly braces and colons. Others use invalid brackets or symbols.
  3. Final Answer:

    drone_times = {'Alpha': 30, 'Beta': 45, 'Gamma': 25} -> Option B
  4. Quick Check:

    Dict = {key: value} [OK]
Hint: Use curly braces and colons for Python dictionaries [OK]
Common Mistakes:
  • Using square brackets instead of curly braces
  • Using '=' or '->' instead of ':'
  • Using parentheses instead of braces
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard