Problem instantiating classes in Python 3 [closed]

0

When I run my program test.py : debug returns me

  

object () takes no parameters '' on line 4

from tatu2 import Cliente
from tatu2 import Conta

joao = Cliente('João da Silva', '777-1234')
maria = Cliente('Maria da Silva', '555-4321')
conta1 = Conta([joao], 1, 1000)
conta2 = Conta([maria, joao], 2, 500)
conta1.saque(50)
conta2.deposito(300)
conta1.saque(190)
conta2.deposito(95.15)
conta2.saque(250)
conta1.extrato()
conta2.extrato()

    
asked by anonymous 27.10.2017 / 02:18

1 answer

1

Your classes have init written wrongly. You are writing:

class Cliente:
    def __int__ (self, nome, telefone):

And the correct one would be:

class Cliente:
    def __init__(self, nome, telefone):
    
27.10.2017 / 03:07