I got the filling the square program to fill no matter what the number given, and it will always align itself at the top left of the screen to start. This allows a side length of approximately 300 before it goes off the screen. Note: you could change the coordinates to be centred, etc.