import math p = 0.1 sum = 0 while p * math.log(10, p) < 0.00001: sum -= p * math.log(10, p) p += 0.1 print(f"{sum:.5f}")