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
>>> 

沒有留言:

張貼留言

OPEN DATA AQI 空氣品質監測網 + NODE-RED

OPEN DATA AQI 空氣品質監測網 + NODE-RED  首頁 - 空氣品質監測網  https://airtw.moenv.gov.tw/ https://data.gov.tw/datasets/search?p=1&size=10&s=_score...