我收到此错误,我已经尝试通过堆栈流可用的帖子我仍然没有得到解决方案。这是代码
class BankAccount:
def _init_(self,balance):
self.balance = balance
def deposit(self,amount):
self.balance += amount
return self.balance
def withdraw(self,amount):
if amount>self.balance:
print "invalid transaction"
else:
self.balance -= amount
return self.balance
class MinimumBalanceAcccount(BankAccount):
//这是我得到的错误:IndentationError: expected an indented block
答案 0 :(得分:0)
其缩进错误。
完成类定义。
class BankAccount:
def _init_(self,balance):
self.balance = balance
def deposit(self,amount):
self.balance += amount
return self.balance
def withdraw(self,amount):
if amount>self.balance:
print "invalid transaction"
else:
self.balance -= amount
return self.balance
class MinimumBalanceAcccount(BankAccount):
def __init__(self):
print "working"