Module 15 · In your browser · challenge 3 of 3 in this lesson
summarizeCohort computes d1, d7, d30, playtime7PerUser, ltv7 and ltv30 from one cohort row, with every rate per new user
A code cell with the real Luau runner grades it. No Studio needed.
Open
Level 3, Professional
Challenge
Write summarizeCohort(row) for rows of beacon-yard-cohorts.csv and summarizeDay(row) for rows of beacon-yard-daily.csv. Keep them separate: a cohort row and a day row describe different players.
- Start from
- The Luau cell below (runs in your browser)
- Check it here
- Run the code cell; the challenge completes when it passes. No Studio needed.
Done means
- summarizeCohort computes d1, d7, d30, playtime7PerUser, ltv7 and ltv30 from one cohort row, with every rate per new user
- summarizeCohort returns nil for d30 and ltv30 when d30_retained or gross_spend_30d_robux is nil (immature cohort)
- summarizeDay computes avgSession, conversion, arppu and arpdau from one daily row, and ARPDAU equals conversion * ARPPU
- Both functions return 0 (never NaN or inf) when a denominator such as new_users, paying_users, dau or sessions is 0