Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Boring solution in Clear category for Number Base by Vulwsztyn
def checkio(str_number, radix):
try:
x=int(str_number, radix)
return (x)
except ValueError:
return -1
#These "asserts" using only for self-checking and not necessary for auto-testing
Oct. 14, 2016