This code is attempting to determine if X is a prime number, by doing the following:
let Y = X initially
1. Check to see if the number (Y) is greater than 2.
2. Assign a new variable (LOW) one-less than the starting number (Y-1)
3. If X mod LOW is greater than zero, then recurse with LOW as the new Y
Repeat this until X mod LOW is greater than zero and your mod is 1 (Y=2), then if I'm reading this (and remembering the formula) correctly, you should have X as a prime.
If at some point X mod LOW equals zero, then X is a non-prime.
Example: X=6 (non-prime)
Y=6, LOW=5, Z = 6 mod 5 = 1 --> help(6,5)
Y=5, LOW=4, Z = 6 mod 4 = 2 --> help(6,4)
Y=4, LOW=3 Z = 6 mod 3 = 0 --> non prime because it's divisible by 3 in this case
Example: X=5 (prime)
Y=5, LOW=4, Z= 5 mod 4 = 1 --> help(5,4)
Y=4, LOW=3, Z= 5 mod 3 = 2 --> help(5,3)
Y=3, LOW=2 Z= 5 mod 2 = 3 --> help(5,2)
Y=2, --> once you get to this point, X is prime, because LOW=1,
and any number mod 1 is greater than zero, and you can't "X mod 0".
Make sense? It's effectively iterating over numbers less than X to see if it divides equally (mod = 0).
trace.
then run your program, it will trace each step so you can follow along.