def maxPower(base): x = 0.5 power = 0 while x > 0: power = power + 1 x = x / base return power print(maxPower(2))