/roman-numerals

Roman numerals convertor, a small project illustrating advanced Python concepts

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

roman-numerals

Roman numerals convertor, a little project illustrating advanced Python concepts

This project contains:

  • User-defined class with constructors, static methods and many overriden magic methods
    • Users are able to do type conversion, string representation, arithmetic and comparison operations, using Roman numerals and other numeric types
  • Custom made decorator
  • Custom made enum
  • Custom made exceptions
  • Custom made generator
  • Implementation of the Iterator Protocol
  • Unit tests for all functionality in the project
  • Requirements file, holding the runtime dependencies

Steps for using the project:

  • Create a virtual environment for the project and activate it: conda create -n env_name python=3.10
  • Install the dependencies: pip install -r requirements.txt
  • Run the test suit from the project base directory: python -m pytest tests
  • Start Python interpretor, import the Roman class and play with Roman numbers!