Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
import random
from datetime import datetime
class Cliente:
def init(self, nome, cpf, endereco):
self.nome = nome
self.cpf = cpf
self.endereco = endereco
class PessoaFisica(Cliente):
def init(self, nome, cpf, data_nascimento, endereco):
super().init(nome, cpf, endereco)
self.data_nascimento = data_nascimento
class Conta:
def init(self, cliente):
self.cliente = cliente
self.agencia = random.randint(100, 999)
self.numero = random.randint(10000000, 99999999)
self.saldo = 0
self.saques_feitos = 0
self.saques_diarios = 0
self.extrato = []
class ContaCorrente(Conta):
def init(self, cliente):
super().init(cliente)
self.limite_cheque_especial = 5000
class Historico:
def init(self):
self.transacoes = []
class Transacao:
def init(self, valor):
self.valor = valor
self.data = datetime.now()
class Saque(Transacao):
def str(self):
return f"Saque de R${self.valor:.2f} em {self.data}"
class Deposito(Transacao):
def str(self):
return f"Depósito de R${self.valor:.2f} em {self.data}"
class Banco:
def init(self):
self.clientes = {}
self.contas = []
def main():
banco = Banco()
if name == "main":
main()