* 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>
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* added roman to integer conversion (LeetCode No. 13)
* updated directory to include Roman to Integer
* Delete DIRECTORY.md
* Update roman_to_integer.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Changed as suggested
Now return in same format as oct() returns
* Slight change
* Fixed issue #1368, return values for large number now is fixed and does not return in scientific notation
* Update decimal_to_octal.py
* bin(num) can convert ZERO and negative decimal numbers to binary. Consistent with built-in python bin(x) function.
* bin(num) can convert ZERO and negative decimal numbers to binary. Consistent with built-in python bin(x) function.
* Added doctests. bin(num) can convert ZERO and negative decimal numbers to binary. Consistent with built-in python bin(x) function.
* Added doctests. bin(num) can convert ZERO and negative decimal numbers to binary. Consistent with built-in python bin(x) function.
* Added doctests. bin(num) can convert ZERO and negative decimal numbers to binary. Consistent with built-in python bin(x) function.
* doctests still failing.
* Doctests added.
* added automated doctest to decimal_to_hexadecimal.py in conversions
* improved error handling and added more test cases in decimal_to_hexadecimal.py
* implemented 0x notation and simplified AssertionError
* fixed negative notation and added comparison test against Python hex function
* Create average_median.py
I created a program to calculate the median of a list of numbers.
* Changed Odd to Even in String
* Create decimal_to_binary.py
- Added 'conversions' folder.
- Created a decimal to binary converter.
* Implemented Decimal to Octal Algorithm
- I created a decimal to octal converter based on the converter in the TheAlgorithms/Python project.
- I added two newlines to make the output of decimal_to_binary.py better.