-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
47 lines (41 loc) · 1.97 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
store_products = [
{"title": "iPhone 15 Pro Max", "price": 1299, "category": "Smartphone"},
{"title": "Samsung Galaxy S24 Ultra", "price": 1199, "category": "Smartphone"},
{"title": "Google Pixel 8 Pro", "price": 999, "category": "Smartphone"},
{"title": "MacBook Pro 14", "price": 1999, "category": "Laptop"},
{"title": "Dell XPS 13 Plus", "price": 1699, "category": "Laptop"},
{"title": "Lenovo ThinkPad X1 Carbon", "price": 1899, "category": "Laptop"},
{"title": "iPad Pro 12.9", "price": 1099, "category": "Tablet"},
{"title": "Samsung Galaxy Tab S9 Ultra", "price": 999, "category": "Tablet"},
{"title": "Microsoft Surface Pro 9", "price": 999, "category": "Tablet"},
{"title": "Apple Watch Ultra", "price": 799, "category": "Wearable"},
{"title": "Samsung Galaxy Watch 6 Classic", "price": 449, "category": "Wearable"},
{"title": "Fitbit Sense 2", "price": 299, "category": "Wearable"},
{"title": "Amazon Echo Show 15", "price": 249, "category": "Smart Home"},
{"title": "Google Nest Hub Max", "price": 229, "category": "Smart Home"},
{"title": "Sonos Beam (Gen 2)", "price": 449, "category": "Audio"},
{"title": "Sony WH-1000XM5", "price": 399, "category": "Audio"},
{"title": "Bose QuietComfort 45", "price": 329, "category": "Audio"},
{"title": "Logitech G Pro X Superlight", "price": 149, "category": "Gaming"},
{"title": "Razer Viper Ultimate", "price": 169, "category": "Gaming"},
{"title": "SteelSeries Arctis Nova Pro", "price": 349, "category": "Gaming"}
]
def get_category_totals(products):
"""
Returns a dictionary containing the Categories and it's total from a product list
Example:
{
"Category A": 100,
"Category B": 200,
"Category C": 300
}
"""
pass
def get_products_stats(products):
"""
BONUS
Get products stats from a list of products
Example:
"Total products in Store: 10, Net worth: $1,200"
"""
pass