我不知道如何在 Python 中计算负数的平方。我知道你可以这样做x**2,但如果你使用-1**2它,结果是 -1,但 -1 的平方是 1。
x**2
-1**2
python numbers square
numbers ×1
python ×1
square ×1