Loading lesson…
Level 1 · Apprentice0 XP
Indentation, lists, dicts, tuples, slicing, comprehensions and f-strings, mapped to Kotlin.
Step 1 / 6
ProblemYou open an AI notebook and see [x for x in rows if x], d.get('k', 0), a[-3:] and f'{n:.2f}'. Every line is short, and you cannot read any of it.
← → step
Before this: Python, for someone who knows Kotlin
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Given a list of dicts with name, model and tokens, use comprehensions to: list names that used more than 1,000 tokens, total tokens per model in a dict, and the top three users. Print a summary with f-strings.