For the snoob function, let n be the length of bit strings, k the number of 1-bits. On average, how many times is the while-loop body executed?

Analyze the for the snoob function, let n be the length of bit strings, k the number of 1-bits. on average, how many times is the while-loop body executed?.

Examples
Input: "test_input_1"
Output: "output_1"
Hints

For the snoob function, let n be the length of bit strings, k the number of 1-bits. On average, how many times is the while-loop body executed?

Analyze the for the snoob function, let n be the length of bit strings, k the number of 1-bits. on average, how many times is the while-loop body executed?.