Skip to content

Instantly share code, notes, and snippets.

@reemalnaji
Forked from eguyd/Ch5_Ex6.py
Created November 12, 2020 02:56
Show Gist options
  • Save reemalnaji/3ea41a21e5335a55bc478f5ff5a2b510 to your computer and use it in GitHub Desktop.
Save reemalnaji/3ea41a21e5335a55bc478f5ff5a2b510 to your computer and use it in GitHub Desktop.
A main function that tests the conversion function with numbers in several bases.
"""
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