I am very new to python. I have just recently started doing computer science. I am however stuck on this topic as to how do I get the value of the continued fraction of e constant after I've input a number. Please do not solve it for me but teach me how to go about it. I am not sure if I should use while loops or for loops and even if I do, I am not sure how to go about it.
This is the full phrasing,

When tackling these mathematical questions, the best strategy I use is to try to break the problem down into tiny steps. This is what the function for n = 1,2,3 looks like.
I would then try to work out by hand what the function for n=4 and n=5 would look like. Once I have got the hang of it, generalise it in your own words. Then, convert that to your programming language of choice.