Comparison Operators in Python
📖 Scenario: You are helping a store manager check if products meet certain price conditions to decide discounts.
🎯 Goal: Build a small program that compares product prices to a threshold and shows if they are expensive or affordable.
📋 What You'll Learn
Create a dictionary with product names and their prices
Create a price threshold variable
Use comparison operators to check if each product price is greater than the threshold
Print the product name and whether it is 'Expensive' or 'Affordable'
💡 Why This Matters
🌍 Real World
Stores often need to compare prices to decide discounts or promotions.
💼 Career
Understanding comparison operators is essential for data filtering and decision-making in programming jobs.
Progress0 / 4 steps