0
0
Digital Marketingknowledge~30 mins

Churn prediction and prevention in Digital Marketing - Mini Project: Build & Apply

Choose your learning style9 modes available
Churn Prediction and Prevention
📖 Scenario: You work for a subscription-based company that wants to reduce customer churn. Churn means customers stop using the service. Your team collects data about customers and wants to identify which customers are likely to leave soon. This helps the company take action to keep them.
🎯 Goal: Build a simple step-by-step plan to organize customer data, set a churn risk threshold, identify customers at risk, and prepare a list for targeted retention efforts.
📋 What You'll Learn
Create a dictionary with exact customer names and their last month's usage in hours
Add a churn risk threshold variable with a specific value
Use a dictionary comprehension to find customers below the threshold
Add a final step to prepare a list of customers to contact for retention
💡 Why This Matters
🌍 Real World
Companies use churn prediction to keep customers by identifying who might leave and offering them incentives or support.
💼 Career
Marketing analysts and customer success managers use these techniques to improve customer retention and increase revenue.
Progress0 / 4 steps
1
DATA SETUP: Create customer usage data
Create a dictionary called customer_usage with these exact entries: 'Alice': 5, 'Bob': 12, 'Charlie': 3, 'Diana': 8, 'Ethan': 1. The numbers represent hours used last month.
Digital Marketing
Need a hint?

Use curly braces to create a dictionary with customer names as keys and usage hours as values.

2
CONFIGURATION: Set churn risk threshold
Create a variable called churn_threshold and set it to 6. This means customers using less than 6 hours last month are at risk of churn.
Digital Marketing
Need a hint?

Just assign the number 6 to the variable churn_threshold.

3
CORE LOGIC: Identify customers at risk of churn
Use a dictionary comprehension to create a new dictionary called at_risk_customers that includes only customers from customer_usage whose usage is less than churn_threshold. Use for customer, hours in customer_usage.items() in your comprehension.
Digital Marketing
Need a hint?

Use dictionary comprehension with an if condition to filter customers.

4
COMPLETION: Prepare list of customers to contact
Create a list called contact_list that contains only the names of customers from at_risk_customers. Use a list comprehension with for customer in at_risk_customers.
Digital Marketing
Need a hint?

Use a list comprehension to extract keys from the at_risk_customers dictionary.