Criei a classe mas ela apresenta um erro ao instanciar:
class Conta:
def __init__(self, numero, titular, saldo, limite):
print (self)
self.numero = numero
self.titular = titular
self.saldo = saldo
self.limite = limite
e o print do console:
>>from conta import Conta
>>cliente1 = Conta(123,'agagoal',80000,100000)
Traceback (most recent call last):
File "C:\Users\agalm\AppData\Local\Programs\Python\Python310\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\Users\agalm\PycharmProjects\AluraOO\conta.py", line 4, in __init__
print ('Construindo objeto...{}'.format(self))
TypeError: unsupported operand type(s) for /: 'str' and 'str'
cliente1 = Conta(123,'agagoal',80000.00,100000.00)
Traceback (most recent call last):
File "C:\Users\agalm\AppData\Local\Programs\Python\Python310\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\Users\agalm\PycharmProjects\AluraOO\conta.py", line 4, in __init__
print ('Construindo objeto...{}'.format(self))
TypeError: unsupported operand type(s) for /: 'str' and 'str'
from conta import Conta
cliente1 = Conta(123,'agagoal',80000.00,100000.00)
Traceback (most recent call last):
File "C:\Users\agalm\AppData\Local\Programs\Python\Python310\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\Users\agalm\PycharmProjects\AluraOO\conta.py", line 4, in __init__
print (format(self))
TypeError: unsupported operand type(s) for /: 'str' and 'str'