self.__arrAccount[i]).GetId() == myId 


이렇게 한느데 오류떠요 



전체 소스는 아래에

(파이썬은 제대로 공부한 적이 없습니다. C언어랑 C++으로는 구현을 완료해서 파이썬으로 구현하고있는데 달라서 어렵네요

 ( 아직 소스는 작성중이라서 엉성합니다. 중간점검을 위해서 실험해봤는데 오류가 떠서..)




def main() :

    manager1 = manageAccount()

    while(1) :

        print("--- 선택 ---")

        print("1. 계좌생성")

        print("2. 계좌출금")

        print("3. 계좌송금")

        print("4. 계좌 정보 출력")

        print("5. 모든 계좌 정보 출력")

        print("6. 종료")

        n = int(input("입력 : "))

        if( n  == 1 ) :

            manager1.MakeAccount()

        elif( n == 2 ) :

            manager1.WithdrawMoney()

        elif( n == 3 ) :

            print()

        elif( n == 4 ) :

            manager1.ShowAllAccount

        elif( n == 5 ) :

            print()

        elif( n == 6 ) :

            print("프로그램을 종료합니다.")

            break



class manageAccount :


    def __init__(self) :

        self.__arrAccount = [50]

        self.__numOfAccount = 0


    def MakeAccount(self) :

        if( self.__numOfAccount >= 50 ) :

            print("저장할 수 있는 ID의 수를 초과했습니다")

        else :

            myName = input("이름을 입력하세요 : ")

            while(1) :

                for i in range(0, self.__numOfAccount+1) :

                    myId = input("ID를 입력하시오 : ")

                    if( self.__arrAccount[i].GetId() == myId ) :

                        while(1) :

                            print("이미 사용중인 ID입니다.")

                            myId = input("ID를 입력하시오 : ")

                            if( self.__arrAccount[i].GetId() != myId ) :

                                break

                    else :

                        break

                            

            myPassword = input("비밀번호를 입력하시오 : ")

            self.__arrAccount[numOfAccount] = Account(myName, myId, myPassword, 0)

            self.__numOfAccount = self.numOfAccount + 1



    def WithdrawMoney(self) :

        myId = input("정보를 출력할 계좌ID를 입력하시오 : ")

        for i in range(0, self.__numOfAccount) :

            if(self.__arrAccount[i].GetId() == myId) :

                myPass = input("비밀번호를 입력하시오 : ")

                if(self.__arrAccount[i].GetPassword() == myPass) :                

                    print("현재 잔액 : ", self.__arrAccount[i].GetBalance())

                    wdBalance = input("출금금액입력 : ")

                    while((self.__arrAccount[i].GetBalance()) < wdBalance) :

                        print("현재잔액보다 더 큰 금액을 입력하셨습니다.")

                        wdBalance = input("출금금액입력 : ")

                        if((self.__arrAccount[i].GetBalance()) > wdBalance) :

                            print("출금완료!")

                            self.__arrAccount[i].WithdrawBalance(wdBalance)

                else :

                    print("패스워드가 틀립니다.")

                    myPass = input("패스워드 다시입력 : ")

                    if(self.__arrAccount[num].GetPassword() == myPass) :

                        print("현재 잔액 : ", self.__arrAccount[i].getBalance())

                        wdBalance = input("출금금액입력 : ")

                    while((self.__arrAccount[num].GetBalance()) < wdBalance) :

                        print("현재잔액보다 더 큰 금액을 입력하셨습니다.")

                        wdBalance = input("출금금액입력 : ")

                        if((self.__arrAccount[i].GetBalance()) > wdBalance) :

                            print("출금완료!")

                            self.__arrAccount[i].WithdrawBalance(wdBalance)

            else :

                print("입력하신 ID는 존재하지 않습니다")

                

            


    def SendMoney() :

        print()




    def ShowAllMembers() :

        for i in range(0, self.numOfAccount) :

            self.arrAccount[i].ShowAccountInfo()


    

    





class Account :


    def __Init__(self, myName, myId, myPassword, myBalance) :

        self.name = myName

        self.id = myId

        self.password = myPassword

        self.balance = myBalance

        

    def ShowAccountInfo() :

        print("이름 : ", self.name)

        print("ID : ", self.id)

        print("비밀번호 : ", self.password)

        print("잔액 : ", self.balance)


    def GetId() :

        return self.id


    def GetBalance() :

        return self.balance


    def GetPassword() :

        return self.password


    def InputId(ID) :

        self.id = ID


    def InputName(NAME) :

        self.name = NAME


    def WithdrawBalance(wdBalance) :

        self.balance = self.balance - wdBalance

        

main()