| def simulate_retention(words): | |
| timeline = [] | |
| score = 100 | |
| for i, w in enumerate(words): | |
| # drop-off logic | |
| if i > len(words) * 0.7: | |
| score -= 2 | |
| if w["text"].lower() in ["boring", "slow"]: | |
| score -= 10 | |
| timeline.append(max(score, 0)) | |
| return timeline |
| def simulate_retention(words): | |
| timeline = [] | |
| score = 100 | |
| for i, w in enumerate(words): | |
| # drop-off logic | |
| if i > len(words) * 0.7: | |
| score -= 2 | |
| if w["text"].lower() in ["boring", "slow"]: | |
| score -= 10 | |
| timeline.append(max(score, 0)) | |
| return timeline |