def from_dec(number: int, new_base: int) -> str:
converted = ""
remainder = 0
while number > 0:
remainder = number % new_base
number = number // new_base
if remainder > 9:
converted = chr(ord('A') + remainder - 10) + converted
else:
converted = str(remainder) + converted
return converted
number = 241
base = 16
converted = from_dec(number, base)
print(f'{number} (10) = {converted} ({base})')