# Someone else's Machine Learning tutorial code

This puzzle was inspired by some tutorial code I downloaded from someone else’s GitHub. To protect the guilty, I have withheld the author’s name, paraphrased the relevant Python into pseudo-code and “removed the context”. I will only say the context has something to do with machine learning.

What message is represented by the following pseudo-code below and why?

NOTE: for purposes of this question please ignore the distinction between sets (unordered collection of objects) and strings (ordered set of characters, which may contain repeated letters).

• Is there a particular reason that the code is in an image instead of a code block? The latter would be easier to work with, but there might some puzzle-related reason behind the choice so I'll hold off transcribing for now. Nov 9, 2022 at 5:04
• The comment and realization of the function split_ABC are not identical. The actual ratio of A, B and C are p, (q - qp) and (1 - p - q + qp). Is that by mistake or intended?
– xd y
Nov 9, 2022 at 5:37
• FWIW the GitHub code in question seems to have improved and the bug is fixed. I'm not sure if that was the result of me posting this puzzle :) Dec 13, 2022 at 22:11

some coders SUCK

Explanation

First, I saw that the numbers 0.285714 and 0.48571 are decimal approximations of 2/7 and 3/7 respectively, and that there are 14 letters in the initial set.

Based on the comments being about dividing the input set randomly, I can guess that this means that the final answer is probably 3 words, drawn from 4, 6, and 4 letters from the original set.

Next, there are four capital letters. If there were three, I'd have assumed that each one was the start of the word, but since there are four, they're probably all part of the same word. It helps that these four letters anagram to "SUCK" which is a fairly well known word. After that, I case-bashed to get "some" and "coders" which seems to fit the theme.

• Your hypothesis is further corroborated by the fact that the (pseudo-)code doesn't actually work: the length of "temp" is not the same as that of X, so the second split happens at the wrong place.
– Bass
Nov 9, 2022 at 7:02
• Yes, this is the correct solution - and the comments by Bass and "xd y" are correct. Admittedly not my greatest puzzle but I was somewhat annoyed by the fact that Joe Bloggs can't even get a basic tutorial example right, and I did put in the effort to go through it since it was most definitely work-related Nov 9, 2022 at 10:52