Write a Python program to solve (x + y) * (x + y)

example:-

x=6,y=2

(6 + 2) ^ 2) = 64

 code:-

x, y = 6, 2
result = x * x + 2 * x * y + y * y
print("({} + {}) ^ 2) = {}".format(x, y, result))

output:-

(6 + 2) ^ 2) = 64

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post