Attempting to make an algorithm that translates to different numerical bases

15 Views Asked by At

I'd like to make an algorithm, f, that takes a, x and y, and returns b in base y as opposed to a in base x. I can't seem to make sense of how to do this, and I've made multiple attempts. How does one go about that?

def f(a, x, y):
    pass  # should convert (a in base x) to (b in base y)

0

There are 0 best solutions below