# Talk:Average loop length

## Analytical formula?

Hi, the task needs the analytical formula to be stated as part of the task description rather than leaving it to be discovered. --Paddy3118 15:53, 4 January 2013 (UTC)

I've watched the lecture; the problem in question is in the last 10 minutes and is only mentioned in passing. IIRC, it is at about 1:32:00 (and I forgot to note it down). If you've got the time though, it's well worth watching the whole thing, and the mathematics involved is extremely simple (yet talks about some very interesting properties of sequences). –Donal Fellows 10:54, 9 January 2013 (UTC)

## Is there an relation to 100 prisoners?

[100 prisoners]
Here is the the task, to calculate the propability of finding a cycle/reoccurence of n? In 100 prisoners you start with number n and hope to find n again. --Horst.h Horst.h (talk) 08:26, 6 February 2020 (UTC)

Sure, in the sense that they share features -- both tasks deal with permutations (and permutations of length 100, at that). But they are also different tasks, and the solutions are different. --Rdm (talk) 17:40, 6 February 2020 (UTC)

## Syntax errors: regarding "as" at lines 39 and 43

Hi;

wren_cli average_loop_length.wren [./average_loop_length line 39] Error at 'as': Expect variable name. [./average_loop_length line 43] Error at 'as': Expected expression.

Thanks, Retired_Build_Engineer

Yeah, the problem there is that, when I wrote this example, Wren was only at version 0.2.0 and I hadn't yet added the C-like Fmt.print statement. 'as' became a keyword in version 0.4.0 and so can no longer be used as an ordinary variable name, hence the error message. Anyway I've changed it now though note that, as the output is random, you'll get a different table each time you run it. --PureFox (talk) 07:01, 2 September 2023 (UTC)