Find palindromic numbers in both binary and ternary bases: Difference between revisions
Content added Content deleted
m (→Functional Python: (tidied top level)) |
|||
Line 1,675: | Line 1,675: | ||
# TEST |
# TEST ---------------------------------------------------- |
||
def main(): |
def main(): |
||
'''Integers with palindromic digits in both binary and ternary''' |
'''Integers with palindromic digits in both binary and ternary''' |
||
Line 1,768: | Line 1,768: | ||
# label :: Method String -> (String, Int) |
# label :: Method String -> (String, Int) |
||
def label(k): |
def label(k): |
||
''' |
'''Stringification, using the named justification |
||
method (ljust|centre|rjust) of the label, |
method (ljust|centre|rjust) of the label, |
||
and the specified amount of white space. |
and the specified amount of white space. |