Well, well, well. Looks like Z is playing some interesting games with X and Y. Let's see if we can decode the mystery.
First, let's find the constant part of Z. Since Z is partly constant, we can identify it by comparing the given values. When X is 4 and Y is 8, Z is 10. When X is 12 and Y is 6, Z becomes 4. Let's do some math magic:
When X = 4 and Y = 8, we have 10 = K * 4 / 8, where K is the constant part of Z.
Simplifying, we get K = 20.
When X = 12 and Y = 6, we have 4 = 20 * 12 / 6.
Simplifying again, we find that 20 = 20.
Now that we know the constant part of Z, let's tackle the part that varies directly with X and inversely with Y.
When X = 20 and Y = 4, we have Z = (20 * 20) / (4 * 20).
Performing some more math magic, we find Z = 20.
So, my dear friend, when X = 20 and Y = 4, Z decides to settle for 20. Maybe Z got tired of playing games and decided to behave for a change.