構文間違い(SyntaxError: invalid syntax)と怒られましたけど、
どこが間違っているのかを教えてください。
コード: class michael: def _init_(self,max): self.max = max self.count = 0 def teach(self): if self.count < self.max: print("もっと強く!") else: print("よーしオッケだ!") self.count += 1 print(self.count) oni = michael(5) for i in range(6): print("スマッシュ") oni.teach()
注:
oni = michael(5)
のoniの構文が間違っているとコンパイラーに指摘されました。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/28 00:54