Iteration Question

Does this function include iteration? It does not have a loop…
Capture

Definitely a maybe. I see the loop. But does the reader see the loop? Do you risk your judge not seeing a for or while statement and not giving credit?

Greetings @jmcdonald,

I definitely agree with @jdonwells here basically this “loop” could be disqualified for 2 main reassons

1:) it’s not instantly recognizable as one, when i see a interval or function recalling itself i usually consider it to be a recursive algorithm rather than an actual loop… while the two may be similar they do serve different purposes

2:) is the student capable of explaining such code as a loop? if your starting a beginner class or intermediate one with how much more steps are involved rather than just using one of the actual loop keywords like for, while, and do while would be functionally explained rather than being explicit

If you believe any of your students are capable enough to explain a method like this than there should be no issue, However since your asking this question the answer should probably be no especially if you aren’t the one grading it. Best practices are always important which is why the majority of my answer is no