Python/conversions
Kevin C. Escobedo 19c3871b21
Added function to convert from decimal to another base (#2087)
* Added function to convert from decimal to another base

* Update conversions/decimal_to_any.py

Changed type() to isinstance()

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update conversions/decimal_to_any.py

Changed to base in (0, 1)

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update conversions/decimal_to_any.py

Updated to div not in (0, 1)

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update conversions/decimal_to_any.py

Updated to make condition clearer

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update conversions/decimal_to_any.py

Using divmod() instead of % operator

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update conversions/decimal_to_any.py

Improved readability on a docstring test

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update conversions/decimal_to_any.py

Changed use of type() to isinstance()

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update conversions/decimal_to_any.py

Changed from use of type() to isinstance()

Co-authored-by: Christian Clauss <cclauss@me.com>

* Made changes and improved function

* Update conversions/decimal_to_any.py

Added space to docstring test

Co-authored-by: Christian Clauss <cclauss@me.com>

* Changed action for bad input

* Added support for conversions up to base 36 (#2087)

* Added support for conversions up to base 36 and renamed HEXADECIMAL dict (#2087)

* Fixed whitespace issue (#2087)

* Fixed issue with line length (#2087)

* Fixed issue with conversions past base-10 failing (#2087)

* Added more robust testing (#2087)

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-06-11 17:59:42 +02:00
..
decimal_to_any.py Added function to convert from decimal to another base (#2087) 2020-06-11 17:59:42 +02:00
decimal_to_binary.py conversions/decimal_to_binary.py: Add type hints (#2001) 2020-06-02 16:47:10 +02:00
decimal_to_hexadecimal.py psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
decimal_to_octal.py Tighten up psf/black and flake8 (#2024) 2020-05-22 08:10:11 +02:00
roman_to_integer.py Create roman_to_integer.py (#1636) 2019-12-21 00:23:15 +01:00