Skip to main content

Practice ยท 2 of 4

Transform: Records to Labels

students = [{"name": "Minh", "score": 8}, {"name": "Lan", "score": 5}] (0-10 scale). Write to_labels(students) returning a NEW list of strings "name: pass" when score >= 6 else "name: retake".

Difficulty: beginner

Back to lesson: Practice: Transformation & AI Critique