diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e656eab..d0ffdce 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,2 @@ * @Coding-Cuddles/kata-maintainers +/.github/CODEOWNERS @Coding-Cuddles/kata-maintainers diff --git a/README.md b/README.md index 051b572..2dc5493 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) +Implement conversions between Arabic numerals and Roman numerals in Python 3.11 +or later with pytest. Setup is complete when the existing starter test passes. + ## Overview This kata complements [Clean Code: Advanced TDD, Ep. 19](https://cleancoders.com/episode/clean-code-episode-19-p1). @@ -13,8 +16,8 @@ test-driven development. ## Instructions -Roman numerals are a numeral system that was used by ancient Rome. Numbers in -this system use letters from the Latin alphabet. Currently, it uses seven symbols: +Roman numerals are a numeral system used in ancient Rome. Numbers in this +system use seven letters from the Latin alphabet: | Symbol | Value | |:-------|-------| @@ -26,8 +29,8 @@ this system use letters from the Latin alphabet. Currently, it uses seven symbol | D | 500 | | M | 1000 | -Instead of writing the same letter four times, a rule for subtraction is used: -the letter is written once, then the next largest Roman numeral is written. +Instead of writing the same letter four times, a subtraction rule is used: the +letter is written once, followed by the next larger Roman numeral. For example, 4 is not written as IIII, but instead as IV, because IV is V (5) minus I (1). @@ -35,21 +38,20 @@ In general, the values for 5, 50, and 500 are not subtracted. ### Exercise 1 -The task at hand entails crafting a function `to_roman(number: int) -> str` to -convert regular Arabic numbers into Roman numerals, such as: +Implement `to_roman(number: int) -> str` to convert Arabic numerals into Roman +numerals, such as: - 4 → IV - 7 → VII - 9 → IX -The lowest number you can write in Roman Numerals is number I (1). And the -largest numeral is MMMCMXCIX (3999). +The smallest supported number is 1 (`I`), and the largest is 3999 +(`MMMCMXCIX`). ### Exercise 2 -In this phase, the objective is to develop a function `from_roman(number: str) --> int` that performs the reverse conversion, transforming Roman numerals into -their corresponding Arabic digits. +Implement `from_roman(number: str) -> int` to perform the reverse conversion +from Roman numerals to Arabic numerals. ## Guiding principles