def square(x): """returns x squared""" return x*x def difference(x,y): """returns the difference between x and y as a positive number""" if x > y: return x-y else: return y-x num1 = float(raw_input("Enter the first number: ")) num2 = float(raw_input("Enter the second number: ")) print "The difference between these numbers is " + str(difference(num1,num2)) + "." print "The squares of these numbers are " + str(square(num1)) + " and " + str(square(num2)) + "." print "The difference between the squares is " + str(difference(square(num1),square(num2))) + "."