From af6534cb0109e8b87d3b315c9967ced90f7887d3 Mon Sep 17 00:00:00 2001 From: vbarzana Date: Fri, 22 Mar 2019 09:35:28 +0000 Subject: [PATCH 1/4] [feature] Created the proposal for a Roman2Dec-App idea. --- Projects/Roman2Dec-App.md | 105 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Projects/Roman2Dec-App.md diff --git a/Projects/Roman2Dec-App.md b/Projects/Roman2Dec-App.md new file mode 100644 index 00000000..696cf756 --- /dev/null +++ b/Projects/Roman2Dec-App.md @@ -0,0 +1,105 @@ +# Bin2Dec + +**Tier:** 1-Intermediate + +The purpose of this app is to allow the user put in practice both, algorithmic and Web Development knowledge by creating a Roman to Decimal numbers converter app. +Please read on. + +The numeric system represented by Roman numerals originated in ancient Rome and remained the usual way of writing numbers throughout Europe well into the Late Middle Ages. Numbers in this system are represented by combinations of letters from the Latin alphabet. Roman numerals, as used today, employ seven symbols, each with a fixed integer value, as follows:[1] + +See the below table with *Symbol - Value* + + I - 1 + V - 5 + X - 10 + L - 50 + C - 100 + D - 500 + M - 1000 + +**Basic decimal pattern** + +The original pattern for Roman numerals used the symbols I, V, and X (1, 5, and 10) as simple tally marks. Each marker for 1 (I) added a unit value up to 5 (V), and was then added to (V) to make the numbers from 6 to 9: + +**I, II, III, IIII, V, VI, VII, VIII, VIIII, X.** + +The numerals for 4 (IIII) and 9 (VIIII) proved problematic (among other things, they are easily confused with III and VIII, especially at a quick glance), and are generally replaced with IV (one less than 5) and IX (one less than 10). This feature of Roman numerals is called subtractive notation. + +The numbers from 1 to 10 (including subtractive notation for 4 and 9) are expressed in Roman numerals as follows: + +**I, II, III, IV, V, VI, VII, VIII, IX, X.[2]** + +The system being basically decimal, tens and hundreds follow the same underlying pattern. This is the key to understanding Roman numerals: + +Thus 10 to 100 (counting in tens, with X taking the place of I, L taking the place of V and C taking the place of X): + +**X, XX, XXX, XL, L, LX, LXX, LXXX, XC, C.** + +Note that 40 (XL) and 90 (XC) follow the same subtractive pattern as 4 and 9, avoiding the confusing XXXX. + +Similarly, 100 to 1000 (counting in hundreds): + +**C, CC, CCC, CD, D, DC, DCC, DCCC, CM, M.** + +Again - 400 (CD) and 900 (CM) follow the standard subtractive pattern, avoiding CCCC. + +In the absence of standard symbols for 5,000 and 10,000 the pattern breaks down at this point - in modern usage M is repeated up to three times. The Romans had several ways to indicate larger numbers, but for practical purposes Roman Numerals for numbers larger than 3,999 are seldom if ever used nowadays, and this suffices. + +**M, MM, MMM.** + +Many numbers include hundreds, units and tens. The Roman numeral system being basically decimal, each power of ten is added in descending sequence from left to right, as with Arabic numerals. For example: + +``` +39 = "Thirty nine" (XXX+IX) = XXXIX. +246 = "Two hundred and forty six" (CC+XL+VI) = CCXLVI. +421 = "Four hundred and twenty one" (CD+XX+I) = CDXXI. +``` + +As each power of ten (or "place") has its own notation there is no need for place keeping zeros, so "missing places" are ignored, as in Latin (and English) speech, thus: + +``` +160 = "One hundred and sixty" (C+LX) = CLX +207 = "Two hundred and seven" (CC+VII) = CCVII +1066 = "A thousand and sixty six" (M+LX+VI) = MLXVI.[3][4] +``` +Roman numerals for large numbers are nowadays seen mainly in the form of year numbers (other uses are detailed later in this article), as in these examples: +``` +1776 (M+DCC+LXX+VI) = MDCCLXXVI (the date written on the book held by the Statue of Liberty).[5] +1954 (M+CM+L+IV) = MCMLIV (as in the trailer for the movie The Last Time I Saw Paris)[6] +1990 (M+CM+XC) = MCMXC (used as the title of musical project Enigma's debut album MCMXC a.D., named after the year of its release). +2014 (MM+X+IV) = MMXIV (the year of the games of the XXII (22nd) Olympic Winter Games (in Sochi) + +The current year (2019) is MMXIX. +``` + +Source: https://en.wikipedia.org/wiki/Roman_numerals + +This challenge requires that the developer implementing it follow these +constraints: + +- Maximum decimal number that can be converted to Roman Numerals is within the range of 1 to 3999 + +## User Stories + +- [ ] User should enter one Roman number in an input field +- [ ] The calculation must be done as the user type +- [ ] User views the results in a single output field containing the + decimal (base 10) equivalent of the the roman number that was entered. + +## Bonus features + +- [ ] As a user I would like to be able to convert from decimal to Roman + +## Trello Board + +pending... + +## Useful links and resources + +[An explanation of Roman Numbers](https://en.wikipedia.org/wiki/Roman_numerals) + +## Example projects + +Try not to view this until you've developed your own solution: + +- [Roman Number Converter](https://www.calculatorsoup.com/calculators/conversions/roman-numeral-converter.php) \ No newline at end of file From 5005ce3d1e4224a7c41522322e1292f17c08a08d Mon Sep 17 00:00:00 2001 From: Victor Antonio Barzana Crespo Date: Fri, 22 Mar 2019 09:44:44 +0000 Subject: [PATCH 2/4] Update Roman2Dec-App.md Renaming Bin2Dec by Roman2Dec... --- Projects/Roman2Dec-App.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/Roman2Dec-App.md b/Projects/Roman2Dec-App.md index 696cf756..1eec1d3c 100644 --- a/Projects/Roman2Dec-App.md +++ b/Projects/Roman2Dec-App.md @@ -1,4 +1,4 @@ -# Bin2Dec +# Roman2Dec **Tier:** 1-Intermediate @@ -102,4 +102,4 @@ pending... Try not to view this until you've developed your own solution: -- [Roman Number Converter](https://www.calculatorsoup.com/calculators/conversions/roman-numeral-converter.php) \ No newline at end of file +- [Roman Number Converter](https://www.calculatorsoup.com/calculators/conversions/roman-numeral-converter.php) From 91deff98142a8ee1f93765415f1353006eff4d21 Mon Sep 17 00:00:00 2001 From: vbarzana Date: Mon, 25 Mar 2019 07:05:34 +0000 Subject: [PATCH 3/4] Roman2Dec-App [fix] Removing extra comments. --- Projects/Roman2Dec-App.md | 62 +++------------------------------------ 1 file changed, 4 insertions(+), 58 deletions(-) diff --git a/Projects/Roman2Dec-App.md b/Projects/Roman2Dec-App.md index 696cf756..7434eb11 100644 --- a/Projects/Roman2Dec-App.md +++ b/Projects/Roman2Dec-App.md @@ -3,9 +3,10 @@ **Tier:** 1-Intermediate The purpose of this app is to allow the user put in practice both, algorithmic and Web Development knowledge by creating a Roman to Decimal numbers converter app. -Please read on. -The numeric system represented by Roman numerals originated in ancient Rome and remained the usual way of writing numbers throughout Europe well into the Late Middle Ages. Numbers in this system are represented by combinations of letters from the Latin alphabet. Roman numerals, as used today, employ seven symbols, each with a fixed integer value, as follows:[1] +The numeric system represented by Roman numerals originated in ancient Rome and remained the +usual way of writing numbers throughout Europe well into the Late Middle Ages. +Roman numerals, as used today, employ seven symbols, each with a fixed integer value. See the below table with *Symbol - Value* @@ -17,62 +18,7 @@ See the below table with *Symbol - Value* D - 500 M - 1000 -**Basic decimal pattern** - -The original pattern for Roman numerals used the symbols I, V, and X (1, 5, and 10) as simple tally marks. Each marker for 1 (I) added a unit value up to 5 (V), and was then added to (V) to make the numbers from 6 to 9: - -**I, II, III, IIII, V, VI, VII, VIII, VIIII, X.** - -The numerals for 4 (IIII) and 9 (VIIII) proved problematic (among other things, they are easily confused with III and VIII, especially at a quick glance), and are generally replaced with IV (one less than 5) and IX (one less than 10). This feature of Roman numerals is called subtractive notation. - -The numbers from 1 to 10 (including subtractive notation for 4 and 9) are expressed in Roman numerals as follows: - -**I, II, III, IV, V, VI, VII, VIII, IX, X.[2]** - -The system being basically decimal, tens and hundreds follow the same underlying pattern. This is the key to understanding Roman numerals: - -Thus 10 to 100 (counting in tens, with X taking the place of I, L taking the place of V and C taking the place of X): - -**X, XX, XXX, XL, L, LX, LXX, LXXX, XC, C.** - -Note that 40 (XL) and 90 (XC) follow the same subtractive pattern as 4 and 9, avoiding the confusing XXXX. - -Similarly, 100 to 1000 (counting in hundreds): - -**C, CC, CCC, CD, D, DC, DCC, DCCC, CM, M.** - -Again - 400 (CD) and 900 (CM) follow the standard subtractive pattern, avoiding CCCC. - -In the absence of standard symbols for 5,000 and 10,000 the pattern breaks down at this point - in modern usage M is repeated up to three times. The Romans had several ways to indicate larger numbers, but for practical purposes Roman Numerals for numbers larger than 3,999 are seldom if ever used nowadays, and this suffices. - -**M, MM, MMM.** - -Many numbers include hundreds, units and tens. The Roman numeral system being basically decimal, each power of ten is added in descending sequence from left to right, as with Arabic numerals. For example: - -``` -39 = "Thirty nine" (XXX+IX) = XXXIX. -246 = "Two hundred and forty six" (CC+XL+VI) = CCXLVI. -421 = "Four hundred and twenty one" (CD+XX+I) = CDXXI. -``` - -As each power of ten (or "place") has its own notation there is no need for place keeping zeros, so "missing places" are ignored, as in Latin (and English) speech, thus: - -``` -160 = "One hundred and sixty" (C+LX) = CLX -207 = "Two hundred and seven" (CC+VII) = CCVII -1066 = "A thousand and sixty six" (M+LX+VI) = MLXVI.[3][4] -``` -Roman numerals for large numbers are nowadays seen mainly in the form of year numbers (other uses are detailed later in this article), as in these examples: -``` -1776 (M+DCC+LXX+VI) = MDCCLXXVI (the date written on the book held by the Statue of Liberty).[5] -1954 (M+CM+L+IV) = MCMLIV (as in the trailer for the movie The Last Time I Saw Paris)[6] -1990 (M+CM+XC) = MCMXC (used as the title of musical project Enigma's debut album MCMXC a.D., named after the year of its release). -2014 (MM+X+IV) = MMXIV (the year of the games of the XXII (22nd) Olympic Winter Games (in Sochi) - -The current year (2019) is MMXIX. -``` - -Source: https://en.wikipedia.org/wiki/Roman_numerals +Please take a look in Wikipedia [for more details about Roman Numbers](https://en.wikipedia.org/wiki/Roman_numerals) This challenge requires that the developer implementing it follow these constraints: From a89d81ae84ae48bfd1c20a104bffc15c8f34e582 Mon Sep 17 00:00:00 2001 From: Victor Antonio Barzana Crespo Date: Mon, 25 Mar 2019 11:25:14 +0200 Subject: [PATCH 4/4] Update Roman2Dec-App.md Removing the wiki link that appeared twice the document. --- Projects/Roman2Dec-App.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Projects/Roman2Dec-App.md b/Projects/Roman2Dec-App.md index 3d88e2d4..8350c611 100644 --- a/Projects/Roman2Dec-App.md +++ b/Projects/Roman2Dec-App.md @@ -18,8 +18,6 @@ See the below table with *Symbol - Value* D - 500 M - 1000 -Please take a look in Wikipedia [for more details about Roman Numbers](https://en.wikipedia.org/wiki/Roman_numerals) - This challenge requires that the developer implementing it follow these constraints: