diff --git a/exercises/practice/accumulate/accumulate.py b/exercises/practice/accumulate/accumulate.py index bd64897e110..9462f350151 100644 --- a/exercises/practice/accumulate/accumulate.py +++ b/exercises/practice/accumulate/accumulate.py @@ -1,2 +1,5 @@ def accumulate(collection, operation): - pass + result = [] + for item in collection: + result.append(operation(item)) + return result diff --git a/exercises/practice/anagram/anagram.py b/exercises/practice/anagram/anagram.py index 9812eb18f25..e1024647407 100644 --- a/exercises/practice/anagram/anagram.py +++ b/exercises/practice/anagram/anagram.py @@ -1,2 +1,7 @@ def find_anagrams(word, candidates): - pass + resultado = [] + + for anagrams in candidates: + if word.lower() != anagrams.lower() and sorted(anagrams.lower()) == sorted(word.lower()): + resultado.append(anagrams) + return resultado \ No newline at end of file diff --git a/exercises/practice/hello-world/hello_world.py b/exercises/practice/hello-world/hello_world.py index adaa6c2c997..d695ea11589 100644 --- a/exercises/practice/hello-world/hello_world.py +++ b/exercises/practice/hello-world/hello_world.py @@ -1,2 +1,2 @@ def hello(): - return 'Goodbye, Mars!' + return 'Hello, World!'