Advanced · 4 labs
Store learner profiles, track lesson XP, count words, and summarize nested course catalogs — the dictionary tools Sythra uses for student records.
Total labs
4
Completed
0
Remaining
4
Progress
0%
In this track
0 / 4 done
Sythra saves each learner as a small profile record. Write build_profile(name, level, xp). Rules - Return a dict with keys name, level, and xp - Values must match the arguments Examples - build_profile("Asha", 3, 240) → {"name": "Asha", "level": 3, "xp": 240} - build_profile("Neo", 1, 0) → {"name": "Neo", "level": 1, "xp": 0}
Not started · 0%
Sythra tracks XP earned per lesson title in a progress dict. Write record_progress(progress, lesson, xp). Rules - Use get with a default of 0 for the lesson key - Add xp to the existing amount for that lesson - Keep all other lessons unchanged - Return the updated progress dict Examples - record_progress({}, "Loops", 10) → {"Loops": 10} - record_progress({"Loops": 10}, "Loops", 5) → {"Loops": 15} - record_progress({"Loops": 10}, "Lists", 20) → {"Loops": 10, "Lists": 20}
Not started · 0%
Sythra's tutor analyzes notes to see which words appear most. Write word_frequency(text). Rules - Split on whitespace into words - Lowercase each word before counting - Return a dict mapping word to count - Empty or whitespace-only text → {} Examples - word_frequency("Hi hi Bye") → {"hi": 2, "bye": 1} - word_frequency("Loop Loop loop") → {"loop": 3} - word_frequency("") → {}
Not started · 0%
Sythra's catalog nests courses, modules, and lesson lists. Write course_lesson_counts(catalog). catalog shape: course name → module name → list of lesson titles Return a dict: course name → total lesson count (sum of all module list lengths) Examples - one course, two modules with 2 and 1 lessons → that course maps to 3 - empty catalog → {} - course with empty modules → 0 for that course
Not started · 0%