* add integer to roman function
simply added fastest method i found.
* Rename roman_to_integer.py to roman_numerals.py
* Update roman_numerals.py
* Update roman_numerals.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added decimal_to_binary_recursion.py
* Added decimal_to_binary_recursion.py
* Made changes to docstring
* Use divmod()
* binary_recursive(div) + str(mod)
* Be kind with user input if possible
* Update decimal_to_binary_recursion.py
* ValueError: invalid literal for int() with base 10: 'number'
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update and rename bin_to_octal.py to binary_to_octal.py
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* added conversions between celsius and fahrenheit
* Renamed celsius_to_fahrenheit.py
* Fixed spelling issues
* modified file to fit the 88-character limit
* added changes to pass the travis-ci test
* further changed the files to pass the travis-ci test
* further changed the files to pass the travis-ci test
* Shortened conversions/fahrenheit_to_celsius.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Type hints added to conversions/fahrenheit_to_celsius.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* changed the code to let the caller do the printing
* addressed the changes made on github
* Added Kelvin conversions and put temperature functions in a single file
* Removed whitespace from a blank line
* Update temperature_conversions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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.