Edit the given Python code to add a feature which will print the squares of given numbers.
def printNumbers(a, b): 
    for i in range(a, b + 1): 
        print(i, end = " ")
def printNumbers(a, b): 
    for i in range(a, b + 1): 
        print(i, end = " ") 
    print("\n")
    for i in range(a, b + 1):
        print(i*i, end = " ")