2018年1月8日 星期一

Python: Python program to solve (x + y) * (x + y)

Python: Python program to solve (x + y) * (x + y)

Python Basic: Exercise-38 with Solution

Write a Python program to solve (x + y) * (x + y).
Sample Solution:-
x, y = 4, 3
result = x * x + 2 * x * y + y * y
print("({} + {}) ^ 2) = {}".format(x, y, result))

========= RESTART: F:/Python_APSC/py-ex-basic-38.py =========
(4 + 3) ^ 2) = 49
>>> 

沒有留言:

張貼留言

ESP32 Telegram 指令選單(Bot Commands)

ESP32 Telegram 指令選單(Bot Commands)  /*******************************************************************  ***********************************...