Open eline13 opened 2 years ago
Hi eline13
You should call the exponential function on the natural logarithm, so the function you create in 0.34 on the new function, so use the natural_logaritihm you already made and then switch the places so you don't use the log on the exponent.
Kind regards Lasse
This is my solution, but I have some doubts about the end of the code when I should call the nested function...the code works but it returns a strange result at the end...best regards, Niccolò
x = 1 k_max = 100
def natural_logarithm(x,k_max): total = 0 k = 0 while k < k_max: my_log = (1/(2k+1)) (((x-1)/(x+1))*(2k+1)) total += my_log k += 1
print(total)
answer_034 = 2 * total
return answer_034
def eulers_e(x,k): answer_033 = (1 + (x/k))**k return answer_033
def exponentiate(func): def with_exp(x, k): e = eulers_e(x, k) value = func(e, k) return value return with_exp
logexp = exponentiate(natural_logarithm(x,k_max)) answer_035 = logexp print(answer_035)
hi, i am this far in 3.5, but it seems like i do something wrong, what do i miss?