diff --git a/python/src/matrica_min.py b/python/src/matrica_min.py new file mode 100644 index 0000000..647f523 --- /dev/null +++ b/python/src/matrica_min.py @@ -0,0 +1,9 @@ +# https://www.codewars.com/kata/5d5ee4c35162d9001af7d699 +def sum_of_minimums(numbers): + result = 0 + for i in numbers: + result += min(i) + return result + + +print(sum_of_minimums([[1, 2, 3, 4, 5], [5, 6, 7, 8, 9], [20, 21, 34, 56, 100]])) diff --git a/python/src/pol'ski'.py b/python/src/pol'ski'.py new file mode 100644 index 0000000..f6b23a9 --- /dev/null +++ b/python/src/pol'ski'.py @@ -0,0 +1,17 @@ +# https://www.codewars.com/kata/57ab2d6072292dbf7c000039 +abs = {"ą": "a", + "ć": "c", + "ę": "e", + "ł": "l", + "ń": "n", + "ó": "o", + "ś": "s", + "ź": "z", + "ż": "z"} + +word = "Jędrzej Błądziński" + +for i in abs.keys(): + word = word.replace(i, abs[i]) +print(word) + diff --git a/python/src/spisok.py b/python/src/spisok.py new file mode 100644 index 0000000..f05d7d6 --- /dev/null +++ b/python/src/spisok.py @@ -0,0 +1,13 @@ +# https://www.codewars.com/kata/59a9919107157a45220000e1 +# list = [] + + +def find_all(list, x): + result = [] + for i in range(0, len(list)): + if x == list[i]: + result.append(i) + return result + + +print(find_all([6, 9, 3, 4, 3, 82, 11], 3))