print("\t3 instâncias de carro, atribuindo uma cor diferente para cada um deles.\n")

class Carro:

    def __init__(self, cor):
        self.cor = cor

objCarroA = Carro("azul")
objCarroB = Carro("vermelho")
objCarroC = Carro("preto")

print(f"Cor do carro A: {objCarroA.cor}")
print(f"Cor do carro B: {objCarroB.cor}")
print(f"Cor do carro C: {objCarroC.cor}")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: