0
0
Data Analysis Pythondata~15 mins

Why project-based learning cements skills in Data Analysis Python - See It in Action

Choose your learning style9 modes available
Why project-based learning cements skills
📖 Scenario: Imagine you are a data analyst helping a small online bookstore understand how project-based learning helps students improve their skills. You have data about students' learning methods and their skill improvement scores.
🎯 Goal: You will create a small data structure with student data, set a threshold for skill improvement, filter students who improved above the threshold using a comprehension, and finally print the filtered results.
📋 What You'll Learn
Create a dictionary called students with exact entries for student names and their skill improvement scores.
Create a variable called threshold and set it to 70.
Use a dictionary comprehension to create a new dictionary improved_students with students who scored above the threshold.
Print the improved_students dictionary.
💡 Why This Matters
🌍 Real World
Filtering data based on conditions is common in data analysis to focus on important information.
💼 Career
Data analysts often filter and summarize data to help businesses make decisions.
Progress0 / 4 steps
1
Create the student skill improvement data
Create a dictionary called students with these exact entries: 'Alice': 65, 'Bob': 82, 'Charlie': 70, 'Diana': 90, 'Ethan': 55.
Data Analysis Python
Hint

Use curly braces {} to create a dictionary with the exact student names and scores.

2
Set the skill improvement threshold
Create a variable called threshold and set it to 70.
Data Analysis Python
Hint

Just assign the number 70 to the variable threshold.

3
Filter students who improved above the threshold
Use a dictionary comprehension to create a new dictionary called improved_students that includes only students with scores greater than threshold.
Data Analysis Python
Hint

Use {name: score for name, score in students.items() if score > threshold} to filter.

4
Print the filtered students
Print the improved_students dictionary to see which students improved above the threshold.
Data Analysis Python
Hint

Use print(improved_students) to display the dictionary.