- Aug 9, 2020
- 1,390
- 19,402
i'm interested in what you implemented to get this result lol
Basically what I programmed initially was simply to output the number of times the loop ran multiplied by the number of times the loop ran + 1 as I thought Bopl was asking to do that. I programmed that in four lines of python although I likely could have done it more efficiently if I didn't rush myself.
Here is that program:
However what I didn't realize when skimming through Bopl's post is that he mentioned that the end result should be multiplied by the end result + 1 instead of the number of times the loop ran. So like the second comment would be 2 * 3 = 6 and the third comment would be 6 * 7 = 42 instead of 3 * 4 = 12
As a result, I fixed my code to meet that requirement pretty quickly and due to the exponential nature of how that function would work, The numbers get too large to process after just 23 loops.
Here is that code here:
Hopefully this response sufficiently answers your question.

