lead_score(lead) summing points from a dict lead: +30 if company_size >= 200, +20 if title contains 'head' or 'director' (case-insensitive), +25 if visited_pricing is True, +10 per demo attended (demos, capped at +30). Classify: 70+ 'hot', 40+ 'warm', else 'cold'. Return (score, label).lead_score({'company_size': 500, 'title': 'Head of Data', 'visited_pricing': True, 'demos': 1})(85, 'hot')
30+20+25+10 crosses the hot threshold.
min(lead["demos"] * 10, 30).
any(word in title.lower() ...).