Sythra
All tracks

Advanced · 4 labs

Sythra Lesson Queue

Manage lesson queues, score stats, filters, and leaderboards with Python lists — the same structures Sythra uses behind the scenes.

Total labs

4

Completed

0

Remaining

4

Progress

0%

In this track

Labs

0 / 4 done

Lab 01Easy

Add and Remove Lessons

Sythra keeps an ordered queue of lessons to study next. Write: 1. add_lesson(queue, lesson) — append and return the queue 2. complete_next(queue) — pop the first lesson and return it, or None if empty Examples - add_lesson(["A"], "B") → ["A", "B"] - complete_next(["A", "B"]) → "A" (queue becomes ["B"]) - complete_next([]) → None

Not started · 0%

Start →
Lab 02Easy

Score Stats

Quiz scores feed Sythra's progress card. Write score_stats(scores) → (total, highest, lowest, average_rounded_1) Empty list → (0, 0, 0, 0.0) Examples - score_stats([10, 20, 30]) → (60, 30, 10, 20.0) - score_stats([]) → (0, 0, 0, 0.0) - score_stats([7]) → (7, 7, 7, 7.0)

Not started · 0%

Start →
Lab 03Medium

Filter Completed

Sythra shows finished lesson titles on the profile. Write completed_lessons(lessons). Each lesson is a dict with title and done (bool). Return a list of titles where done is True, in the same order. Use a list comprehension. Examples - completed_lessons([{"title": "A", "done": True}, {"title": "B", "done": False}]) → ["A"] - none done → [] - all done → all titles

Not started · 0%

Start →
Lab 04Hard

Sort the Leaderboard

Sythra's weekly board shows the top n learners. Write top_scores(entries, n). entries are (name, score) tuples. Sort by score descending; ties broken alphabetically by name. Return the top n entries. If n is 0, return []. If n is larger than the list, return all sorted. Examples - top_scores([("Ravi", 90), ("Asha", 90), ("Neo", 80)], 2) → [("Asha", 90), ("Ravi", 90)] - top_scores([("A", 1)], 5) → [("A", 1)] - top_scores([("A", 1)], 0) → []

Not started · 0%

Start →