base

Convert a number to Excel’s base 26

Convert a number to Excel’s base 26 Question: OK, I’m stuck on something seemingly simple. I am trying to convert a number to base 26 (ie. 3 = C, 27 = AA, ect.). I am guessing my problem has to do with not having a 0 in the model? Not sure. But if you run …

Total answers: 5

How to convert an integer to a string in any base?

How to convert an integer to a string in any base? Question: Python allows easy creation of an integer from a string of a given base via int(str, base). I want to perform the inverse: creation of a string from an integer, i.e. I want some function int2base(num, base), such that: int(int2base(x, b), b) == …

Total answers: 35