diff --git a/exercises/practice/accumulate/accumulate.py b/exercises/practice/accumulate/accumulate.py index bd64897e11..9462f35015 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 9812eb18f2..e102464740 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 adaa6c2c99..d695ea1158 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!'