0
0
EV Technologyknowledge~30 mins

Recycling and sustainability in EV Technology - Mini Project: Build & Apply

Choose your learning style9 modes available
Recycling and Sustainability
📖 Scenario: You are working with a community group that wants to promote recycling and sustainability. They have collected data about different materials and their recycling rates. Your task is to organize this data and highlight materials that have recycling rates below a certain threshold to focus awareness efforts.
🎯 Goal: Build a simple data structure to hold recycling rates for materials, set a threshold for low recycling rates, identify materials below this threshold, and mark them for special attention.
📋 What You'll Learn
Create a dictionary called materials with exact entries for recycling rates
Create a variable called low_threshold set to 50
Use a dictionary comprehension called low_recycling to select materials with recycling rates below low_threshold
Add a final key-value pair 'focus_area': True to low_recycling to mark it for awareness campaigns
💡 Why This Matters
🌍 Real World
Communities and environmental groups often track recycling rates to focus their sustainability efforts where they are most needed.
💼 Career
Data organization and filtering skills are essential for environmental analysts, sustainability coordinators, and community planners.
Progress0 / 4 steps
1
Create the recycling data dictionary
Create a dictionary called materials with these exact entries: 'Plastic': 30, 'Glass': 70, 'Paper': 60, 'Metal': 45, 'Electronics': 20
EV Technology
Need a hint?

Use curly braces {} to create a dictionary with keys as material names and values as recycling rates.

2
Set the low recycling threshold
Create a variable called low_threshold and set it to 50
EV Technology
Need a hint?

Just assign the number 50 to the variable low_threshold.

3
Select materials below the threshold
Use a dictionary comprehension called low_recycling to select materials from materials where the recycling rate is less than low_threshold
EV Technology
Need a hint?

Use a dictionary comprehension with for material, rate in materials.items() and an if condition to filter.

4
Mark low recycling materials for focus
Add a key-value pair 'focus_area': True to the low_recycling dictionary
EV Technology
Need a hint?

Use the assignment low_recycling['focus_area'] = True to add the new key-value pair.