You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> An implementation of Roman numerals in Python, made with the purpose of studying object-oriented programming as well as exploring dunder methods in Python.
4
+
5
+
## :scroll: The Roman Integer
6
+
7
+
There's a class called Roman which can receive either an integer or a string representing a Roman numeral (e.g. XVII).
8
+
When printed, a Roman numeral is always going to be displayed in a Roman fashion. Other than that, it is a regular integer:
9
+
it can perform sum, subtraction, multiplication and division with other Roman objects and integers.
10
+
11
+
Roman numerals are always integers. It can be used as an integer if the Roman object is converted with the int() function.
12
+
Warning: there are no representations of the number 0 or of float numbers, so passing them as Roman numerals will raise
13
+
exceptions or ignore decimal values.
14
+
15
+
## 💻 Requirements
16
+
17
+
The following setup was used to make the source code on this repository:
0 commit comments