Create SquareWithFunction2.py

Another implementation of squares with function