From 8299551dd4ca682914fdbdcc3b41af4fdcfc9eb2 Mon Sep 17 00:00:00 2001
From: Egor Kostan <20955183+ikostan@users.noreply.github.com>
Date: Thu, 2 Jan 2025 07:13:50 -0800
Subject: [PATCH 1/7] Conversion between Kilobyte and KibiByte
---
kyu_6/README.md | 85 ++++++------
.../README.md | 48 +++++++
.../__init__.py | 1 +
.../solution.py | 52 +++++++
.../test_memory_size_conversion.py | 129 ++++++++++++++++++
5 files changed, 273 insertions(+), 42 deletions(-)
create mode 100644 kyu_6/conversion_between_kilobyte_and_kibibyte/README.md
create mode 100644 kyu_6/conversion_between_kilobyte_and_kibibyte/__init__.py
create mode 100644 kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py
create mode 100644 kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
diff --git a/kyu_6/README.md b/kyu_6/README.md
index 34a227c647c..2ec2ec2a85b 100644
--- a/kyu_6/README.md
+++ b/kyu_6/README.md
@@ -15,47 +15,48 @@ rank - the harder the kata the faster you advance.
### List of Completed Kata (Python 3)
-| No. | Puzzle/Kata Name | Solution / GitHub Link |
-|-----|:---------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------:|
-| 1 | [Character frequency](https://www.codewars.com/kata/53e895e28f9e66a56900011a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/character_frequency) |
-| 2 | [Count letters in string](https://www.codewars.com/kata/5808ff71c7cfa1c6aa00006d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/count_letters_in_string) |
-| 3 | [Duplicate Encoder](https://www.codewars.com/kata/54b42f9314d9229fd6000d9c) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/duplicate_encoder) |
-| 4 | [Find the odd int](https://www.codewars.com/kata/54da5a58ea159efa38000836) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/find_the_odd_int) |
-| 5 | [First character that repeats](https://www.codewars.com/kata/54f9f4d7c41722304e000bbb) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/first_character_that_repeats) |
-| 6 | [Character with longest consecutive repetition](https://www.codewars.com/kata/586d6cefbcc21eed7a001155) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/longest_repetition) |
-| 7 | [Numericals of a String](https://www.codewars.com/kata/5b4070144d7d8bbfe7000001) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/numericals_of_string) |
-| 8 | [Permute a Palindrome](https://www.codewars.com/kata/58ae6ae22c3aaafc58000079) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/permute_a_palindrome) |
-| 9 | [Pyramid Array](https://www.codewars.com/kata/515f51d438015969f7000013) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/pyramid_array) |
-| 10 | [String subpattern recognition I](https://www.codewars.com/kata/5a49f074b3bfa89b4c00002b) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_1) |
-| 11 | [String subpattern recognition II](https://www.codewars.com/kata/5a4a391ad8e145cdee0000c4) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_2) |
-| 12 | [String subpattern recognition III](https://www.codewars.com/kata/5a4a2973d8e14586c700000a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_3) |
-| 13 | [String transformer](https://www.codewars.com/kata/5878520d52628a092f0002d0) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_transformer) |
-| 14 | [Unique In Order](https://www.codewars.com/kata/54e6533c92449cc251001667) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/unique_in_order) |
-| 15 | [Vasya - Clerk](https://www.codewars.com/kata/555615a77ebc7c2c8a0000b8) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/vasya_clerk) |
-| 16 | [Multiples of 3 or 5](https://www.codewars.com/kata/514b92a657cdc65150000006) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/multiples_of_3_or_5) |
-| 17 | [Sum of Digits / Digital Root](https://www.codewars.com/kata/541c8630095125aba6000c00) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sum_of_digits_digital_root) |
-| 18 | [Binary to Text (ASCII) Conversion](https://www.codewars.com/kata/5583d268479559400d000064) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/binary_to_text_ascii_conversion) |
-| 19 | [Casino chips](https://www.codewars.com/kata/5e0b72d2d772160011133654) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/casino_chips) |
-| 20 | [Pokemon Damage Calculator](https://www.codewars.com/kata/536e9a7973130a06eb000e9f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/pokemon_damage_calculator) |
-| 21 | [Help the bookseller !](https://www.codewars.com/kata/54dc6f5a224c26032800005c) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/help_the_bookseller) |
-| 22 | [Row of the odd triangle](https://www.codewars.com/kata/5d5a7525207a674b71aa25b5) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/row_of_the_odd_triangle) |
-| 23 | [Disease Spread](https://www.codewars.com/kata/566543703c72200f0b0000c9) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/disease_spread) |
-| 24 | [A Rule of Divisibility by 13](https://www.codewars.com/kata/564057bc348c7200bd0000ff) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/a_rule_of_divisibility_by_13) |
-| 25 | [Color Choice](https://www.codewars.com/kata/55be10de92aad5ef28000023) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/color_choice) |
-| 26 | [DefaultList](https://www.codewars.com/kata/5e882048999e6c0023412908) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/default_list) |
-| 27 | [Easy Diagonal](https://www.codewars.com/kata/559b8e46fa060b2c6a0000bf) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/easy_diagonal) |
-| 28 | [Array to HTML table](https://www.codewars.com/kata/5e7e4b7cd889f7001728fd4a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/array_to_html_table) |
-| 29 | [rotate the letters of each element](https://www.codewars.com/kata/5e98712b7de14f0026ef1cc1) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/rotate_the_letters_of_each_element) |
-| 30 | [Number Zoo Patrol](https://www.codewars.com/kata/5276c18121e20900c0000235) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/number_zoo_patrol) |
-| 31 | [Your order, please](https://www.codewars.com/kata/55c45be3b2079eccff00010f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/your_order_please) |
-| 32 | [Who likes it?](https://www.codewars.com/kata/5266876b8f4bf2da9b000362) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/who_likes_it) |
-| 33 | [Encrypt this!](https://www.codewars.com/kata/5848565e273af816fb000449) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/encrypt_this) |
-| 34 | [Decipher this!](https://www.codewars.com/kata/decipher-this) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/decipher_this) |
-| 35 | [Format a string of names like 'Bart, Lisa & Maggie'.](https://www.codewars.com/kata/53368a47e38700bd8300030d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/format_string_of_names) |
-| 36 | [Sort the odd](https://www.codewars.com/kata/578aa45ee9fd15ff4600090d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sort_the_odd) |
-| 37 | [Array.diff](https://www.codewars.com/kata/523f5d21c841566fde000009) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/array_diff) |
-| 38 | [Scheduling](https://www.codewars.com/kata/550cc572b9e7b563be00054f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/scheduling) |
-| 39 | [Sums of Parts](https://www.codewars.com/kata/5ce399e0047a45001c853c2b) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sums_of_parts) |
-| 40 | [Find the in-between point](https://www.codewars.com/kata/58a672d6426bf38be4000057) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/find_the_in_between_point) |
+| No. | Puzzle/Kata Name | Solution / GitHub Link |
+|-----|:---------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------:|
+| 1 | [Character frequency](https://www.codewars.com/kata/53e895e28f9e66a56900011a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/character_frequency) |
+| 2 | [Count letters in string](https://www.codewars.com/kata/5808ff71c7cfa1c6aa00006d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/count_letters_in_string) |
+| 3 | [Duplicate Encoder](https://www.codewars.com/kata/54b42f9314d9229fd6000d9c) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/duplicate_encoder) |
+| 4 | [Find the odd int](https://www.codewars.com/kata/54da5a58ea159efa38000836) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/find_the_odd_int) |
+| 5 | [First character that repeats](https://www.codewars.com/kata/54f9f4d7c41722304e000bbb) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/first_character_that_repeats) |
+| 6 | [Character with longest consecutive repetition](https://www.codewars.com/kata/586d6cefbcc21eed7a001155) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/longest_repetition) |
+| 7 | [Numericals of a String](https://www.codewars.com/kata/5b4070144d7d8bbfe7000001) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/numericals_of_string) |
+| 8 | [Conversion between Kilobyte and KibiByte](https://www.codewars.com/kata/5a115ff080171f9651000046) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/conversion_between_kilobyte_and_kibibyte) |
+| 8 | [Permute a Palindrome](https://www.codewars.com/kata/58ae6ae22c3aaafc58000079) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/permute_a_palindrome) |
+| 9 | [Pyramid Array](https://www.codewars.com/kata/515f51d438015969f7000013) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/pyramid_array) |
+| 10 | [String subpattern recognition I](https://www.codewars.com/kata/5a49f074b3bfa89b4c00002b) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_1) |
+| 11 | [String subpattern recognition II](https://www.codewars.com/kata/5a4a391ad8e145cdee0000c4) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_2) |
+| 12 | [String subpattern recognition III](https://www.codewars.com/kata/5a4a2973d8e14586c700000a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_3) |
+| 13 | [String transformer](https://www.codewars.com/kata/5878520d52628a092f0002d0) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_transformer) |
+| 14 | [Unique In Order](https://www.codewars.com/kata/54e6533c92449cc251001667) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/unique_in_order) |
+| 15 | [Vasya - Clerk](https://www.codewars.com/kata/555615a77ebc7c2c8a0000b8) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/vasya_clerk) |
+| 16 | [Multiples of 3 or 5](https://www.codewars.com/kata/514b92a657cdc65150000006) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/multiples_of_3_or_5) |
+| 17 | [Sum of Digits / Digital Root](https://www.codewars.com/kata/541c8630095125aba6000c00) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sum_of_digits_digital_root) |
+| 18 | [Binary to Text (ASCII) Conversion](https://www.codewars.com/kata/5583d268479559400d000064) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/binary_to_text_ascii_conversion) |
+| 19 | [Casino chips](https://www.codewars.com/kata/5e0b72d2d772160011133654) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/casino_chips) |
+| 20 | [Pokemon Damage Calculator](https://www.codewars.com/kata/536e9a7973130a06eb000e9f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/pokemon_damage_calculator) |
+| 21 | [Help the bookseller !](https://www.codewars.com/kata/54dc6f5a224c26032800005c) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/help_the_bookseller) |
+| 22 | [Row of the odd triangle](https://www.codewars.com/kata/5d5a7525207a674b71aa25b5) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/row_of_the_odd_triangle) |
+| 23 | [Disease Spread](https://www.codewars.com/kata/566543703c72200f0b0000c9) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/disease_spread) |
+| 24 | [A Rule of Divisibility by 13](https://www.codewars.com/kata/564057bc348c7200bd0000ff) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/a_rule_of_divisibility_by_13) |
+| 25 | [Color Choice](https://www.codewars.com/kata/55be10de92aad5ef28000023) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/color_choice) |
+| 26 | [DefaultList](https://www.codewars.com/kata/5e882048999e6c0023412908) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/default_list) |
+| 27 | [Easy Diagonal](https://www.codewars.com/kata/559b8e46fa060b2c6a0000bf) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/easy_diagonal) |
+| 28 | [Array to HTML table](https://www.codewars.com/kata/5e7e4b7cd889f7001728fd4a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/array_to_html_table) |
+| 29 | [rotate the letters of each element](https://www.codewars.com/kata/5e98712b7de14f0026ef1cc1) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/rotate_the_letters_of_each_element) |
+| 30 | [Number Zoo Patrol](https://www.codewars.com/kata/5276c18121e20900c0000235) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/number_zoo_patrol) |
+| 31 | [Your order, please](https://www.codewars.com/kata/55c45be3b2079eccff00010f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/your_order_please) |
+| 32 | [Who likes it?](https://www.codewars.com/kata/5266876b8f4bf2da9b000362) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/who_likes_it) |
+| 33 | [Encrypt this!](https://www.codewars.com/kata/5848565e273af816fb000449) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/encrypt_this) |
+| 34 | [Decipher this!](https://www.codewars.com/kata/decipher-this) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/decipher_this) |
+| 35 | [Format a string of names like 'Bart, Lisa & Maggie'.](https://www.codewars.com/kata/53368a47e38700bd8300030d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/format_string_of_names) |
+| 36 | [Sort the odd](https://www.codewars.com/kata/578aa45ee9fd15ff4600090d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sort_the_odd) |
+| 37 | [Array.diff](https://www.codewars.com/kata/523f5d21c841566fde000009) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/array_diff) |
+| 38 | [Scheduling](https://www.codewars.com/kata/550cc572b9e7b563be00054f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/scheduling) |
+| 39 | [Sums of Parts](https://www.codewars.com/kata/5ce399e0047a45001c853c2b) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sums_of_parts) |
+| 40 | [Find the in-between point](https://www.codewars.com/kata/58a672d6426bf38be4000057) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/find_the_in_between_point) |
[Source](https://www.codewars.com/about)
\ No newline at end of file
diff --git a/kyu_6/conversion_between_kilobyte_and_kibibyte/README.md b/kyu_6/conversion_between_kilobyte_and_kibibyte/README.md
new file mode 100644
index 00000000000..780ff29effe
--- /dev/null
+++ b/kyu_6/conversion_between_kilobyte_and_kibibyte/README.md
@@ -0,0 +1,48 @@
+# Conversion between Kilobyte and KibiByte
+
+## Background
+
+You most probably know, that the kilo used by IT-People differs
+from the kilo used by the rest of the world. Whereas kilo in kB
+is (mostly) interpreted as 1024 Bytes (especially by operating
+systems) the non-IT kilo denotes the factor 1000 (as in "1 kg is
+1000g"). The same goes for the prefixes mega, giga, tera, peta
+and so on. To avoid misunderstandings (like your hardware shop
+selling you a 1E+12 Byte hard disk as 1 TB, whereas your Windows
+states that it has only 932 GB, because the shop uses factor 1000
+whereas operating systems use factor 1024 by default) the
+International Electro-technical Commission has proposed to use
+KibiByte for 1024 Byte.The according unit symbol would be KiB.
+
+Other Prefixes would be respectively:
+
+```bash
+1 MiB = 1024 KiB
+1 GiB = 1024 MiB
+1 TiB = 1024 GiB
+```
+
+## Task
+
+Your task is to write a conversion function between the kB and the
+KiB-Units. The function receives as parameter a memory size including
+a unit and converts into the corresponding unit of the other system:
+
+```bash
+memorysizeConversion ( "10 KiB") -> "10.24 kB"
+memorysizeConversion ( "1 kB") -> "0.977 KiB"
+memorysizeConversion ( "10 TB") -> "9.095 TiB"
+memorysizeConversion ( "4.1 GiB") -> "4.402 GB"
+```
+
+## Hints
+
+- the parameter always contains a (fraction) number, a whitespace and
+ a valid unit
+- units are case sensitive, valid units are kB MB GB TB KiB MiB GiB TiB
+- result must be rounded to 3 decimals (round half up,no trailing zeros)
+ see examples above
+
+Resources If you want to read more on [...ibi-Units](https://en.wikipedia.org/wiki/Kibibyte)
+
+[Source](https://www.codewars.com/kata/5a115ff080171f9651000046)
\ No newline at end of file
diff --git a/kyu_6/conversion_between_kilobyte_and_kibibyte/__init__.py b/kyu_6/conversion_between_kilobyte_and_kibibyte/__init__.py
new file mode 100644
index 00000000000..3da4b2c788b
--- /dev/null
+++ b/kyu_6/conversion_between_kilobyte_and_kibibyte/__init__.py
@@ -0,0 +1 @@
+"""Conversion between Kilobyte and KibiByte."""
diff --git a/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py b/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py
new file mode 100644
index 00000000000..227561ea6b8
--- /dev/null
+++ b/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py
@@ -0,0 +1,52 @@
+"""
+Solution for -> Conversion between Kilobyte and KibiByte.
+
+Created by Egor Kostan.
+GitHub: https://github.com/ikostan
+"""
+
+UNITS: dict = {
+ 'KiB': ("kB", 1.024),
+ "TiB": ("TB", 1.09951163),
+ "GiB": ("GB", 1.07374182),
+ 'MiB': ('MB', 1.048576),
+ 'kB': ("KiB", 0.9765625),
+ "TB": ("TiB", 0.9094947),
+ "GB": ("GiB", 0.93132257461548),
+ 'MB': ('MiB', 0.95367432)}
+
+
+def memorysize_conversion(memory_size: str) -> str:
+ """
+ Convert between the kB and the KiB-Units.
+
+ The function receives as parameter a memory size
+ including a unit and converts into the corresponding
+ unit of the other system.
+ :param memory_size: str
+ :return: str
+ """
+ # Extract units and ratio
+ units, convertor = unit_extractor(memory_size)
+ # Convert memory size into float
+ memory: float = float(memory_size.split()[0]) * convertor
+ # No trailing zeros allowed
+ memory_str: str = f'{memory:.3f}'
+ return f'{memory_str.rstrip("0")} {units}'
+
+
+def unit_extractor(memory_size: str) -> tuple:
+ """
+ Convert between multiple-byte units.
+
+ :param memory_size: str
+ :return: str
+ """
+ units: str = ''
+ convertor: float = 0.0
+ for key, val in UNITS.items():
+ if key in memory_size:
+ units = val[0]
+ convertor = val[1]
+ break
+ return units, convertor
\ No newline at end of file
diff --git a/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py b/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
new file mode 100644
index 00000000000..d771caa27c9
--- /dev/null
+++ b/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
@@ -0,0 +1,129 @@
+"""
+Test for -> # Conversion between Kilobyte and KibiByte.
+
+Created by Egor Kostan.
+GitHub: https://github.com/ikostan
+"""
+
+# MATHEMATICS STRINGS FUNDAMENTALS
+
+import unittest
+import allure
+from parameterized import parameterized
+from utils.log_func import print_log
+from kyu_6.conversion_between_kilobyte_and_kibibyte.solution import (
+ memorysize_conversion,
+ unit_extractor)
+
+
+@allure.epic('6 kyu')
+@allure.parent_suite('Novice')
+@allure.suite("Fundamentals")
+@allure.sub_suite("Unit Tests")
+@allure.feature("Math")
+@allure.story('# Conversion between Kilobyte and KibiByte.')
+@allure.tag('MATHEMATICS',
+ 'MATH',
+ 'STRINGS',
+ 'FUNDAMENTALS')
+@allure.link(
+ url='https://www.codewars.com/kata/5a115ff080171f9651000046',
+ name='Source/Kata')
+class MemorySizeConversionTestCase(unittest.TestCase):
+ """Test 'Conversion between Kilobyte and KibiByte' solution."""
+
+ @parameterized.expand([
+ ('1 KiB', '1.024 kB', '1 KiB is 1.024 kB'),
+ ("1 MiB", "1.049 MB", "1 MiB is 1.049 MB"),
+ ("1 GB", "0.931 GiB", "1 GB is 0.931 GiB"),
+ ("163.287 GiB", "175.328 GB", "163.287 GiB GiB should equal 175.328 GB"),
+ ('974.834 KiB', '998.23 kB', 'No trailing zeros allowed.')
+ ])
+ def test_memorysize_conversion(self, memory_size, expected, err):
+ """
+ Test 'memorysize_conversion' function with various test data.
+
+ :param memory_size: str
+ :param expected: str
+ :param err: str
+ :return:
+ """
+ # pylint: disable-msg=R0801
+ allure.dynamic.title("Testing 'memorysize_conversion' function:")
+ allure.dynamic.severity(allure.severity_level.NORMAL)
+ allure.dynamic.description_html(
+ '
Codewars badge:
'
+ ''
+ 'Test Description:
'
+ ""
+ "Your task is to write a conversion function between the kB and "
+ "the KiB-Units. The function receives as parameter a memory size "
+ "including a unit and converts into the corresponding unit of the "
+ "other system:"
+ "
"
+ "- 10 KiB -> 10.24 kB
"
+ "- 1 kB -> 0.977 KiB
"
+ "- 10 TB -> 9.095 TiB
"
+ "- 4.1 GiB -> 4.402 GB
"
+ "
"
+ "")
+ # pylint: enable-msg=R0801
+ result: str = memorysize_conversion(memory_size)
+ with allure.step(f"Pass memory size: {memorysize_conversion} "
+ f"and assert the result: {result} vs "
+ f"expected: {expected}"):
+
+ print_log(memory_size=memory_size,
+ result=result,
+ expected=expected,
+ err=err)
+
+ self.assertEqual(result, expected, msg=err)
+
+ @parameterized.expand([
+ ('1 KiB', 'kB', 1.024),
+ ("1 MiB", "MB", 1.048576),
+ ("1 GB", "GiB", 0.93132257461548)])
+ def test_unit_extractor(self, memory_size, units_exp, ratio_exp):
+ """
+ Test 'unit_extractor' function with various test data.
+
+ :param memory_size: str
+ :param units_exp: str
+ :param ratio_exp: float
+ :return:
+ """
+ # pylint: disable-msg=R0801
+ allure.dynamic.title("Testing 'unit_extractor' function:")
+ allure.dynamic.severity(allure.severity_level.NORMAL)
+ allure.dynamic.description_html(
+ 'Codewars badge:
'
+ ''
+ 'Test Description:
'
+ ""
+ "Test a conversion function between the kB and "
+ "the KiB-Units:"
+ "
"
+ "- KiB -> kB, 1.024
"
+ "- kB -> KiB, 0.9765625
"
+ "
"
+ "etc..."
+ "")
+ # pylint: enable-msg=R0801
+ units, ratio = unit_extractor(memory_size)
+ with allure.step(f"Pass memory size: {memorysize_conversion} "
+ f"and assert the units: {units} "
+ f" and ratio: {ratio}"):
+
+ print_log(memory_size=memory_size,
+ units=units,
+ units_exp=units_exp,
+ ratio=ratio,
+ ratio_exp=ratio_exp)
+
+ # assert units conversion
+ self.assertEqual(units, units_exp)
+ # assert ratio
+ self.assertEqual(ratio, ratio_exp)
From dd940834c704711c936c298227e3bbe2e2cf9021 Mon Sep 17 00:00:00 2001
From: Egor Kostan <20955183+ikostan@users.noreply.github.com>
Date: Thu, 2 Jan 2025 07:17:20 -0800
Subject: [PATCH 2/7] Create kyu_6.conversion_between_kilobyte_and_kibibyte.rst
---
...nversion_between_kilobyte_and_kibibyte.rst | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 docs/kyu_6.conversion_between_kilobyte_and_kibibyte.rst
diff --git a/docs/kyu_6.conversion_between_kilobyte_and_kibibyte.rst b/docs/kyu_6.conversion_between_kilobyte_and_kibibyte.rst
new file mode 100644
index 00000000000..a9cb58c880c
--- /dev/null
+++ b/docs/kyu_6.conversion_between_kilobyte_and_kibibyte.rst
@@ -0,0 +1,32 @@
+kyu\_6.conversion\_between\_kilobyte\_and\_kibibyte package
+===========================================================
+
+Submodules
+----------
+
+kyu\_6.conversion\_between\_kilobyte\_and\_kibibyte.solution module
+-------------------------------------------------------------------
+
+.. automodule:: kyu_6.conversion_between_kilobyte_and_kibibyte.solution
+ :members:
+ :undoc-members:
+ :show-inheritance:
+ :private-members:
+
+kyu\_6.conversion\_between\_kilobyte\_and\_kibibyte.test\_memory\_size\_conversion module
+-----------------------------------------------------------------------------------------
+
+.. automodule:: kyu_6.conversion_between_kilobyte_and_kibibyte.test_memory_size_conversion
+ :members:
+ :undoc-members:
+ :show-inheritance:
+ :private-members:
+
+Module contents
+---------------
+
+.. automodule:: kyu_6.conversion_between_kilobyte_and_kibibyte
+ :members:
+ :undoc-members:
+ :show-inheritance:
+ :private-members:
From 0b365d8001180cdc3c32f1bf2f4227d459bcdfdf Mon Sep 17 00:00:00 2001
From: Egor Kostan <20955183+ikostan@users.noreply.github.com>
Date: Thu, 2 Jan 2025 07:21:29 -0800
Subject: [PATCH 3/7] Docs for Conversion between Kilobyte and KibiByte
---
...onversion_between_kilobyte_and_kibibyte.module.rst | 11 +++++++++++
...onversion_between_kilobyte_and_kibibyte.readme.rst | 5 +++++
...kyu_6.conversion_between_kilobyte_and_kibibyte.rst | 0
docs/kyu_6/kyu_6.rst | 1 +
4 files changed, 17 insertions(+)
create mode 100644 docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.module.rst
create mode 100644 docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.readme.rst
rename docs/{ => kyu_6}/kyu_6.conversion_between_kilobyte_and_kibibyte.rst (100%)
diff --git a/docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.module.rst b/docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.module.rst
new file mode 100644
index 00000000000..a352b870218
--- /dev/null
+++ b/docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.module.rst
@@ -0,0 +1,11 @@
+kyu\_6.conversion\_between\_kilobyte\_and\_kibibyte.module package
+==================================================================
+
+Subpackages
+-----------
+
+.. toctree::
+ :maxdepth: 4
+
+ kyu_6.conversion_between_kilobyte_and_kibibyte.readme
+ kyu_6.conversion_between_kilobyte_and_kibibyte
\ No newline at end of file
diff --git a/docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.readme.rst b/docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.readme.rst
new file mode 100644
index 00000000000..d8f002a1f3d
--- /dev/null
+++ b/docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.readme.rst
@@ -0,0 +1,5 @@
+README
+======
+
+.. include:: ../../kyu_6/conversion_between_kilobyte_and_kibibyte/README.md
+ :parser: myst_parser.sphinx_
\ No newline at end of file
diff --git a/docs/kyu_6.conversion_between_kilobyte_and_kibibyte.rst b/docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.rst
similarity index 100%
rename from docs/kyu_6.conversion_between_kilobyte_and_kibibyte.rst
rename to docs/kyu_6/kyu_6.conversion_between_kilobyte_and_kibibyte.rst
diff --git a/docs/kyu_6/kyu_6.rst b/docs/kyu_6/kyu_6.rst
index b4c4d0b6963..bffd903f2bf 100644
--- a/docs/kyu_6/kyu_6.rst
+++ b/docs/kyu_6/kyu_6.rst
@@ -15,6 +15,7 @@ Subpackages
kyu_6.casino_chips.module
kyu_6.character_frequency.module
kyu_6.color_choice.module
+ kyu_6.conversion_between_kilobyte_and_kibibyte.module
kyu_6.count_letters_in_string.module
kyu_6.decipher_this.module
kyu_6.default_list.module
From ae983235bacfd247e933d2705e3ed49d63cbdf82 Mon Sep 17 00:00:00 2001
From: Egor Kostan <20955183+ikostan@users.noreply.github.com>
Date: Thu, 2 Jan 2025 07:26:59 -0800
Subject: [PATCH 4/7] Linting issues
/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py:52:28: W292 no newline at end of file
return units, convertor ^
./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:65:17: E131 continuation line unaligned for hanging indent
"10 KiB -> 10.24 kB"
^
./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:65:46: W291 trailing whitespace
"10 KiB -> 10.24 kB"
^
./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:66:45: W291 trailing whitespace
"1 kB -> 0.977 KiB"
^
./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:67:46: W291 trailing whitespace
"10 TB -> 9.095 TiB"
---
kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py | 2 +-
.../test_memory_size_conversion.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py b/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py
index 227561ea6b8..ca304c12afc 100644
--- a/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py
+++ b/kyu_6/conversion_between_kilobyte_and_kibibyte/solution.py
@@ -49,4 +49,4 @@ def unit_extractor(memory_size: str) -> tuple:
units = val[0]
convertor = val[1]
break
- return units, convertor
\ No newline at end of file
+ return units, convertor
diff --git a/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py b/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
index d771caa27c9..d3f53e0e2c3 100644
--- a/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
+++ b/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
@@ -62,9 +62,9 @@ def test_memorysize_conversion(self, memory_size, expected, err):
"including a unit and converts into the corresponding unit of the "
"other system:"
""
- "- 10 KiB -> 10.24 kB
"
- "- 1 kB -> 0.977 KiB
"
- "- 10 TB -> 9.095 TiB
"
+ "- 10 KiB -> 10.24 kB
"
+ "- 1 kB -> 0.977 KiB
"
+ "- 10 TB -> 9.095 TiB
"
"- 4.1 GiB -> 4.402 GB
"
"
"
"")
From 84e842b4fdf2164de2ee5f00b303552a82200472 Mon Sep 17 00:00:00 2001
From: Egor Kostan <20955183+ikostan@users.noreply.github.com>
Date: Thu, 2 Jan 2025 07:28:34 -0800
Subject: [PATCH 5/7] Update test_memory_size_conversion.py
./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:65:17: E131 continuation line unaligned for hanging indent
"10 KiB -> 10.24 kB"
^
./kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py:66:45: W291 trailing whitespace
"1 kB -> 0.977 KiB"
---
.../test_memory_size_conversion.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py b/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
index d3f53e0e2c3..6d030b12896 100644
--- a/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
+++ b/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
@@ -62,10 +62,10 @@ def test_memorysize_conversion(self, memory_size, expected, err):
"including a unit and converts into the corresponding unit of the "
"other system:"
""
- "- 10 KiB -> 10.24 kB
"
- "- 1 kB -> 0.977 KiB
"
- "- 10 TB -> 9.095 TiB
"
- "- 4.1 GiB -> 4.402 GB
"
+ "- 10 KiB -> 10.24 kB
"
+ "- 1 kB -> 0.977 KiB
"
+ "- 10 TB -> 9.095 TiB
"
+ "- 4.1 GiB -> 4.402 GB
"
"
"
"")
# pylint: enable-msg=R0801
From 7535eb59d1bef75df1656ef4b00c7ef12a6b8c86 Mon Sep 17 00:00:00 2001
From: Egor Kostan <20955183+ikostan@users.noreply.github.com>
Date: Thu, 2 Jan 2025 07:33:26 -0800
Subject: [PATCH 6/7] Update test_memory_size_conversion.py
Using config file /home/runner/work/codewars/codewars/.pylintrc
************* Module kyu_6.rotate_the_letters_of_each_element.group_cities
kyu_6/rotate_the_letters_of_each_element/group_cities.py:1:0: R0801: Similar lines in 2 files
==kyu_6.a_rule_of_divisibility_by_13.test_thirt:[16:21]
==kyu_6.conversion_between_kilobyte_and_kibibyte.test_memory_size_conversion:[18:23]
@allure.epic('6 kyu')
@allure.parent_suite('Novice')
@allure.suite("Fundamentals")
@allure.sub_suite("Unit Tests")
@allure.feature("Math") (duplicate-code)
---
.../test_memory_size_conversion.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py b/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
index 6d030b12896..b8b27594b71 100644
--- a/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
+++ b/kyu_6/conversion_between_kilobyte_and_kibibyte/test_memory_size_conversion.py
@@ -16,6 +16,7 @@
unit_extractor)
+# pylint: disable-msg=R0801
@allure.epic('6 kyu')
@allure.parent_suite('Novice')
@allure.suite("Fundamentals")
@@ -29,6 +30,7 @@
@allure.link(
url='https://www.codewars.com/kata/5a115ff080171f9651000046',
name='Source/Kata')
+# pylint: enable-msg=R0801
class MemorySizeConversionTestCase(unittest.TestCase):
"""Test 'Conversion between Kilobyte and KibiByte' solution."""
From ffb0bdd58fce31d66aa5d2c3bd09d341b5d575b9 Mon Sep 17 00:00:00 2001
From: Egor Kostan <20955183+ikostan@users.noreply.github.com>
Date: Thu, 2 Jan 2025 08:04:20 -0800
Subject: [PATCH 7/7] Update README.md
---
kyu_6/README.md | 81 +++++++++++++++++++++++++------------------------
1 file changed, 42 insertions(+), 39 deletions(-)
diff --git a/kyu_6/README.md b/kyu_6/README.md
index 2ec2ec2a85b..9565c3ddba9 100644
--- a/kyu_6/README.md
+++ b/kyu_6/README.md
@@ -17,46 +17,49 @@ rank - the harder the kata the faster you advance.
| No. | Puzzle/Kata Name | Solution / GitHub Link |
|-----|:---------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------:|
-| 1 | [Character frequency](https://www.codewars.com/kata/53e895e28f9e66a56900011a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/character_frequency) |
-| 2 | [Count letters in string](https://www.codewars.com/kata/5808ff71c7cfa1c6aa00006d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/count_letters_in_string) |
-| 3 | [Duplicate Encoder](https://www.codewars.com/kata/54b42f9314d9229fd6000d9c) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/duplicate_encoder) |
-| 4 | [Find the odd int](https://www.codewars.com/kata/54da5a58ea159efa38000836) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/find_the_odd_int) |
-| 5 | [First character that repeats](https://www.codewars.com/kata/54f9f4d7c41722304e000bbb) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/first_character_that_repeats) |
-| 6 | [Character with longest consecutive repetition](https://www.codewars.com/kata/586d6cefbcc21eed7a001155) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/longest_repetition) |
-| 7 | [Numericals of a String](https://www.codewars.com/kata/5b4070144d7d8bbfe7000001) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/numericals_of_string) |
+| 1 | [A Rule of Divisibility by 13](https://www.codewars.com/kata/564057bc348c7200bd0000ff) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/a_rule_of_divisibility_by_13) |
+| 2 | [Array.diff](https://www.codewars.com/kata/523f5d21c841566fde000009) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/array_diff) |
+| 3 | [Array to HTML table](https://www.codewars.com/kata/5e7e4b7cd889f7001728fd4a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/array_to_html_table) |
+| 4 | [Binary to Text (ASCII) Conversion](https://www.codewars.com/kata/5583d268479559400d000064) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/binary_to_text_ascii_conversion) |
+| 5 | [Casino chips](https://www.codewars.com/kata/5e0b72d2d772160011133654) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/casino_chips) |
+| 6 | [Character frequency](https://www.codewars.com/kata/53e895e28f9e66a56900011a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/character_frequency) |
+| 7 | [Color Choice](https://www.codewars.com/kata/55be10de92aad5ef28000023) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/color_choice) |
| 8 | [Conversion between Kilobyte and KibiByte](https://www.codewars.com/kata/5a115ff080171f9651000046) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/conversion_between_kilobyte_and_kibibyte) |
-| 8 | [Permute a Palindrome](https://www.codewars.com/kata/58ae6ae22c3aaafc58000079) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/permute_a_palindrome) |
-| 9 | [Pyramid Array](https://www.codewars.com/kata/515f51d438015969f7000013) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/pyramid_array) |
-| 10 | [String subpattern recognition I](https://www.codewars.com/kata/5a49f074b3bfa89b4c00002b) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_1) |
-| 11 | [String subpattern recognition II](https://www.codewars.com/kata/5a4a391ad8e145cdee0000c4) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_2) |
-| 12 | [String subpattern recognition III](https://www.codewars.com/kata/5a4a2973d8e14586c700000a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_3) |
-| 13 | [String transformer](https://www.codewars.com/kata/5878520d52628a092f0002d0) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_transformer) |
-| 14 | [Unique In Order](https://www.codewars.com/kata/54e6533c92449cc251001667) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/unique_in_order) |
-| 15 | [Vasya - Clerk](https://www.codewars.com/kata/555615a77ebc7c2c8a0000b8) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/vasya_clerk) |
-| 16 | [Multiples of 3 or 5](https://www.codewars.com/kata/514b92a657cdc65150000006) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/multiples_of_3_or_5) |
-| 17 | [Sum of Digits / Digital Root](https://www.codewars.com/kata/541c8630095125aba6000c00) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sum_of_digits_digital_root) |
-| 18 | [Binary to Text (ASCII) Conversion](https://www.codewars.com/kata/5583d268479559400d000064) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/binary_to_text_ascii_conversion) |
-| 19 | [Casino chips](https://www.codewars.com/kata/5e0b72d2d772160011133654) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/casino_chips) |
-| 20 | [Pokemon Damage Calculator](https://www.codewars.com/kata/536e9a7973130a06eb000e9f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/pokemon_damage_calculator) |
-| 21 | [Help the bookseller !](https://www.codewars.com/kata/54dc6f5a224c26032800005c) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/help_the_bookseller) |
-| 22 | [Row of the odd triangle](https://www.codewars.com/kata/5d5a7525207a674b71aa25b5) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/row_of_the_odd_triangle) |
-| 23 | [Disease Spread](https://www.codewars.com/kata/566543703c72200f0b0000c9) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/disease_spread) |
-| 24 | [A Rule of Divisibility by 13](https://www.codewars.com/kata/564057bc348c7200bd0000ff) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/a_rule_of_divisibility_by_13) |
-| 25 | [Color Choice](https://www.codewars.com/kata/55be10de92aad5ef28000023) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/color_choice) |
-| 26 | [DefaultList](https://www.codewars.com/kata/5e882048999e6c0023412908) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/default_list) |
-| 27 | [Easy Diagonal](https://www.codewars.com/kata/559b8e46fa060b2c6a0000bf) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/easy_diagonal) |
-| 28 | [Array to HTML table](https://www.codewars.com/kata/5e7e4b7cd889f7001728fd4a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/array_to_html_table) |
-| 29 | [rotate the letters of each element](https://www.codewars.com/kata/5e98712b7de14f0026ef1cc1) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/rotate_the_letters_of_each_element) |
-| 30 | [Number Zoo Patrol](https://www.codewars.com/kata/5276c18121e20900c0000235) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/number_zoo_patrol) |
-| 31 | [Your order, please](https://www.codewars.com/kata/55c45be3b2079eccff00010f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/your_order_please) |
-| 32 | [Who likes it?](https://www.codewars.com/kata/5266876b8f4bf2da9b000362) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/who_likes_it) |
-| 33 | [Encrypt this!](https://www.codewars.com/kata/5848565e273af816fb000449) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/encrypt_this) |
-| 34 | [Decipher this!](https://www.codewars.com/kata/decipher-this) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/decipher_this) |
-| 35 | [Format a string of names like 'Bart, Lisa & Maggie'.](https://www.codewars.com/kata/53368a47e38700bd8300030d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/format_string_of_names) |
-| 36 | [Sort the odd](https://www.codewars.com/kata/578aa45ee9fd15ff4600090d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sort_the_odd) |
-| 37 | [Array.diff](https://www.codewars.com/kata/523f5d21c841566fde000009) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/array_diff) |
-| 38 | [Scheduling](https://www.codewars.com/kata/550cc572b9e7b563be00054f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/scheduling) |
+| 9 | [Count letters in string](https://www.codewars.com/kata/5808ff71c7cfa1c6aa00006d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/count_letters_in_string) |
+| 10 | [Decipher this!](https://www.codewars.com/kata/decipher-this) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/decipher_this) |
+| 11 | [DefaultList](https://www.codewars.com/kata/5e882048999e6c0023412908) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/default_list) |
+| 12 | [Disease Spread](https://www.codewars.com/kata/566543703c72200f0b0000c9) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/disease_spread) |
+| 13 | [Duplicate Encoder](https://www.codewars.com/kata/54b42f9314d9229fd6000d9c) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/duplicate_encoder) |
+| 14 | [Easy Diagonal](https://www.codewars.com/kata/559b8e46fa060b2c6a0000bf) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/easy_diagonal) |
+| 15 | [Encrypt this!](https://www.codewars.com/kata/5848565e273af816fb000449) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/encrypt_this) |
+| 16 | [Find the in-between point](https://www.codewars.com/kata/58a672d6426bf38be4000057) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/find_the_in_between_point) |
+| 17 | [Find the odd int](https://www.codewars.com/kata/54da5a58ea159efa38000836) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/find_the_odd_int) |
+| 18 | [First character that repeats](https://www.codewars.com/kata/54f9f4d7c41722304e000bbb) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/first_character_that_repeats) |
+| 19 | [Format a string of names like 'Bart, Lisa & Maggie'.](https://www.codewars.com/kata/53368a47e38700bd8300030d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/format_string_of_names) |
+| 20 | [Help the bookseller !](https://www.codewars.com/kata/54dc6f5a224c26032800005c) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/help_the_bookseller) |
+| 21 | [Character with longest consecutive repetition](https://www.codewars.com/kata/586d6cefbcc21eed7a001155) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/longest_repetition) |
+| 22 | [Multiples of 3 or 5](https://www.codewars.com/kata/514b92a657cdc65150000006) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/multiples_of_3_or_5) |
+| 23 | [No arithmetic progressions](https://www.codewars.com/kata/5e0607115654a900140b3ce3) | N/A |
+| 24 | [Number Zoo Patrol](https://www.codewars.com/kata/5276c18121e20900c0000235) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/number_zoo_patrol) |
+| 25 | [Numericals of a String](https://www.codewars.com/kata/5b4070144d7d8bbfe7000001) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/numericals_of_string) |
+| 26 | [Permute a Palindrome](https://www.codewars.com/kata/58ae6ae22c3aaafc58000079) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/permute_a_palindrome) |
+| 27 | [Pokemon Damage Calculator](https://www.codewars.com/kata/536e9a7973130a06eb000e9f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/pokemon_damage_calculator) |
+| 28 | [Potion Class 101](https://www.codewars.com/kata/5e0607115654a900140b3ce3) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/potion_class_101) |
+| 29 | [Pyramid Array](https://www.codewars.com/kata/515f51d438015969f7000013) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/pyramid_array) |
+| 30 | [Rotate the letters of each element](https://www.codewars.com/kata/5e98712b7de14f0026ef1cc1) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/rotate_the_letters_of_each_element) |
+| 31 | [Row of the odd triangle](https://www.codewars.com/kata/5d5a7525207a674b71aa25b5) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/row_of_the_odd_triangle) |
+| 32 | [Scheduling](https://www.codewars.com/kata/550cc572b9e7b563be00054f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/scheduling) |
+| 33 | [Sort the odd](https://www.codewars.com/kata/578aa45ee9fd15ff4600090d) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sort_the_odd) |
+| 34 | [String subpattern recognition I](https://www.codewars.com/kata/5a49f074b3bfa89b4c00002b) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_1) |
+| 35 | [String subpattern recognition II](https://www.codewars.com/kata/5a4a391ad8e145cdee0000c4) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_2) |
+| 36 | [String subpattern recognition III](https://www.codewars.com/kata/5a4a2973d8e14586c700000a) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_subpattern_recognition_3) |
+| 37 | [String transformer](https://www.codewars.com/kata/5878520d52628a092f0002d0) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/string_transformer) |
+| 38 | [Sum of Digits / Digital Root](https://www.codewars.com/kata/541c8630095125aba6000c00) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sum_of_digits_digital_root) |
| 39 | [Sums of Parts](https://www.codewars.com/kata/5ce399e0047a45001c853c2b) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/sums_of_parts) |
-| 40 | [Find the in-between point](https://www.codewars.com/kata/58a672d6426bf38be4000057) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/find_the_in_between_point) |
+| 40 | [Unique In Order](https://www.codewars.com/kata/54e6533c92449cc251001667) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/unique_in_order) |
+| 41 | [Valid Braces](https://www.codewars.com/kata/5277c8a221e209d3f6000b56) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/valid_braces) |
+| 42 | [Vasya - Clerk](https://www.codewars.com/kata/555615a77ebc7c2c8a0000b8) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/vasya_clerk) |
+| 43 | [Who likes it?](https://www.codewars.com/kata/5266876b8f4bf2da9b000362) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/who_likes_it) |
+| 44 | [Your order, please](https://www.codewars.com/kata/55c45be3b2079eccff00010f) | [Solution](https://github.com/ikostan/codewars/tree/master/kyu_6/your_order_please) |
[Source](https://www.codewars.com/about)
\ No newline at end of file