0
創建一個簡單函數會使用sympy增加圓中心的X值,遇到很多麻煩。這裏是我的代碼:AttributeError:嘗試增加sympy中圓的X值時無法設置屬性
test_center=Point (1,2)
test_circle = Circle (test_center, 1)
def travel (circle, distance):
circle.center.x += distance
return circle.center.x
travel (test_circle,1)
print(test_circle)
我能得到什麼回覆是:
線16條,在旅遊
circle.center.x += distance AttributeError: can't set attribute
任何幫助,將不勝感激!
我希望你能接受標記的答案。 –