This commit is contained in:
2023-09-25 14:36:26 -04:00
commit dcf0512e25
35 changed files with 1088 additions and 0 deletions

16
Roman_Numerals/README.md Normal file
View File

@ -0,0 +1,16 @@
Arabic to Roman Numerals Challenge
==================================
Did you know our numeral system - the symbols we use to represent numbers are called
Arabic numerals? Fun fact, because now it gets serious. You're going to be translating Arabic to Italian.
Have the input form accept a number from the user. When the form is submitted, have the function to_roman take an integer as an argument and return a roman numerals string. For example:
```
60 >> LX
78 >> LXXVIII
99 >> XCIX
3000 >>> MMM
```
Look up Roman Numerals to get a complete list and jog your memory on its ancient conventions. This is an easy challenge to code, but can be a difficult mental exercise. Don't overcomplicate it!
Add your own assert statements to the bottom to test your code.

Binary file not shown.

18
Roman_Numerals/roman.py Normal file
View File

@ -0,0 +1,18 @@
# Use this function to get and return all the prime numbers below the input number
def to_roman(num):
pass
assert to_roman(11) == "XI", "11 should return XI"
assert to_roman(60) == "LX", "60 should return LX"
assert to_roman(78) == "LXXVIII", "78 should return LXXVIII"
assert to_roman(4) == "IV", "4 should return IV"
assert to_roman(99) == "XCIX", "99 should return XCIX"
# Add your own assert tests below