But note that this pattern does not tell you how to find the square roots (although John's program will).
Does p have a square root in Zq? (yes or no)
Does q have a square root in Zp? (yes or no)
Your answer should be of the form "Both questions have the same answer when ...; the questions have opposite answers when ..."
If you can answer this hard question you are in good company - no one could until Euler did in 1783. And he couldn't prove that the pattern he guessed was right. That needed to wait for Gauss, in 1796.
Here's a hint: mod 4 is important.