Why won't this work?

Whenever I run the program, I get lists of three values that fit within the ranges, yet they don't fit the requirements. For example, I get the list [4, 6, 8]. This does not meet the requirements as 16+36 is not a perfect square. Please help me fix this code. Thanks.

As you can see those values do not fit the requirements.

You are viewing a single comment. View All

You have three pairs of for loops, which seems a little redundant. Also, some of your loop variables are named the same thing. I don't know if that's intentional or not, but I'd avoid doing that.