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

Introduction

Write a Python program to solve (x + y) * (x + y). I have used python 3.7 compiler for debugging purpose.

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

Result

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

Leave a Comment