0
0
AI for Everyoneknowledge~30 mins

AI for comparison shopping and research in AI for Everyone - Mini Project: Build & Apply

Choose your learning style9 modes available
AI for Comparison Shopping and Research
📖 Scenario: You want to use AI tools to help you find the best prices and information when shopping online. This project will guide you through understanding how AI can collect and compare product details from different websites to help you make smart buying decisions.
🎯 Goal: Build a simple step-by-step understanding of how AI gathers product data, sets criteria for comparison, analyzes the data, and presents the best options for shopping and research.
📋 What You'll Learn
Create a list of products with their prices and ratings
Set a price limit to filter affordable products
Use AI logic to select products that meet the price limit and have good ratings
Summarize the best products based on the AI's comparison
💡 Why This Matters
🌍 Real World
Online shoppers use AI-powered tools to quickly compare prices and reviews from many stores, saving time and money.
💼 Career
Understanding how AI filters and compares data is useful for roles in e-commerce, marketing, data analysis, and product management.
Progress0 / 4 steps
1
Create a list of products with prices and ratings
Create a list called products where each item is a dictionary with keys 'name', 'price', and 'rating'. Include these exact products: {'name': 'Laptop', 'price': 900, 'rating': 4.5}, {'name': 'Smartphone', 'price': 700, 'rating': 4.7}, {'name': 'Headphones', 'price': 150, 'rating': 4.2}, {'name': 'Smartwatch', 'price': 200, 'rating': 4.0}.
AI for Everyone
Hint

Use a list with dictionaries. Each dictionary should have keys 'name', 'price', and 'rating' with the exact values given.

2
Set a price limit for affordable products
Create a variable called price_limit and set it to 500. This will help the AI filter products that cost less than or equal to this amount.
AI for Everyone
Hint

Just create a variable named price_limit and assign it the number 500.

3
Filter products within the price limit and good ratings
Create a list called affordable_good_products that includes products from products where the price is less than or equal to price_limit and the rating is greater than or equal to 4.0. Use a list comprehension with variables product for each item.
AI for Everyone
Hint

Use a list comprehension with product as the variable. Check both price and rating conditions inside the comprehension.

4
Summarize the best affordable products
Create a list called best_products that contains only the 'name' of each product in affordable_good_products. Use a list comprehension with variable product.
AI for Everyone
Hint

Use a list comprehension to extract the 'name' from each product in affordable_good_products.