Last active
November 12, 2020 02:56
-
-
Save eguyd/7ab864ac24dfadb9d0de434f4a76e982 to your computer and use it in GitHub Desktop.
A main function that tests the conversion function with numbers in several bases.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Define a function decimalToRep that returns the representation of an integer in a | |
given base. The two arguments should be the integer and the base. The function | |
should return a string. It should use a lookup table that associates integers with | |
digits. Include a main function that tests the conversion function with numbers | |
in several bases. | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Define a function decimalToRep that returns the representation of an integer in a
given base. The two arguments should be the integer and the base. The function
should return a string. It should use a lookup table that associates integers with
digits. Include a main function that tests the conversion function with numbers
in several bases.