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

沒有留言:

張貼留言

Fultter APP控制 WOKWI ESP32 RFID+LED (使用flutter_windows_3.19.1-stable Visual studio 1.108.2 )

Fultter APP控制 WOKWI ESP32 RFID+LED (使用flutter_windows_3.19.1-stable  Visual studio  1.108.2 ) 1) Android studio 環境設定 2) Visual studio  1.108...