Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Carro:
- def __init__(self, cor, marca, ligado=False):
- self.cor = cor
- self.marca = marca
- self.ligado = ligado
- def carro_ligado(self):
- print('Ligado')
- self.ligado = True
- def carro_desligado(self):
- print('Desligado')
- self.ligado = False
- def ligar_carro(self):
- from time import sleep
- print('Ligando o carro...')
- sleep(4)
- def desligar_carro(self):
- from time import sleep
- sleep(1)
- print('Desligando o carro...')
- sleep(4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement