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)