私はPythonを学んでいますが、私はこれに関する答えを見つけることができません:このシナリオでaddメソッドを実装するにはどうすればよいですか? (Python)
"現在のフィールドに量を追加する必要があります。
class Complex:
def create(self, real_part, imag_part):
self.r = real_part
self.i = imag_part
class Calculator:
current = 0
def add(self, amount):
*i need to edit only this line*
def get_current(self):
return self.current
をこれがPycharmエドゥチュートリアル(Pythonのタスク50の43への導入)私たちのためにそれを共有するための 感謝の質問です。 –