Coming on
Feb 2018
Redesign the NYC metrocard system. Design a dashboard for a general practitioner. Redesign an ATM.
Learn how to solve and present exercises like these, that top startups use to interview designers for product design and UI/UX roles.
Today top companies are looking for business-minded designers who are not just focused on visuals. With this book you can practice this kind of mindset, learn how to interview designers, find concepts for projects for your portfolio and learn more about the product design role.
def suggest_trade(self): """Simple AI suggestion: buy if price is near lowest recorded, sell if near highest""" suggestions = [] for item in self.prices: hist = self.price_history[item] low = min(hist) high = max(hist) current = self.prices[item] if current <= low * 1.05: suggestions.append(f"🔔 BUY signal for item (near low: $current:.2f)") elif current >= high * 0.95: suggestions.append(f"⚠️ SELL signal for item (near high: $current:.2f)") if suggestions: print("\n📊 AI Trader Suggestion:") for s in suggestions: print(s) else: print("\n🤖 No strong signals right now. Hold or wait.")
def buy(self, item, quantity): if item not in self.prices: print("❌ Invalid item.") return cost = self.prices[item] * quantity if cost > self.balance: print(f"❌ Not enough money. Need $cost:.2f, have $self.balance:.2f") return self.balance -= cost self.inventory[item] += quantity print(f"✅ Bought quantity x item for $cost:.2f") Pop It Trading Script
def sell(self, item, quantity): if item not in self.inventory: print("❌ Invalid item.") return if quantity > self.inventory[item]: print(f"❌ You only have self.inventory[item] pcs of item") return revenue = self.prices[item] * quantity self.balance += revenue self.inventory[item] -= quantity print(f"✅ Sold quantity x item for $revenue:.2f") round(self.prices[item] * (1 + change)
def simulate_market(self): """Random price fluctuations""" for item in self.prices: change = random.uniform(-0.10, 0.15) # -10% to +15% self.prices[item] = max(0.5, round(self.prices[item] * (1 + change), 2)) self.price_history[item].append(self.prices[item]) 2)) self.price_history[item].append(self.prices[item]) >
> suggest 🔔 BUY signal for Glow Pop (near low: $18.75)
def get_portfolio_value(self): total = self.balance for item, qty in self.inventory.items(): total += qty * self.prices[item] return total