diff --git a/exercises/exercise_1/opdracht_1.py b/exercises/exercise_1/opdracht_1.py index 7f6b077..468fc84 100644 --- a/exercises/exercise_1/opdracht_1.py +++ b/exercises/exercise_1/opdracht_1.py @@ -1,2 +1,11 @@ def likes(team: list) -> str: - return True \ No newline at end of file + if len(team) == 0: + return "no one likes this" + elif len(team) == 1: + return f"{team[0]} likes this" + elif len(team) == 2: + return f"{team[0]} and {team[1]} like this" + elif len(team) == 3: + return f"{team[0]}, {team[1]} and {team[2]} like this" + elif len(team) >= 3: + return f"{team[0]}, {team[1]} and {len(team)-2} others like this" \ No newline at end of file