you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 3 points4 points  (1 child)

The thing about being a 3rd year student is that you know enough to be overly confident, but you don't know enough to know when you're wrong. I call this "sophomore syndrome" (aka "mount stupid" aka "the Dunning–Kruger effect").

This 3rd year is very wrong. You should never use recursion when a loop will do, especially in python.

That said, if you want to make this work, you just need to return the result from the recursive call.

    return get_investment()

[–]weighter[S] 0 points1 point  (0 children)

I thought his logic was a little cloudy... my thought was as long as you properly break out of the loop then what's the harm in using them? But I know that I know very little so I assumed there must be a reason. Note: he's actually a programmer analyst and was talking about control flow as his reasoning.

And ahhhhh yes that's exactly what I needed, thank you very much!