Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Quintupla:
- def __init__(self):
- self.estados = set()
- self.transiciones = dict()
- def definir_estado_inicial(self, estado):
- if estado not in self.estados:
- raise RuntimeError('Ese estado NO existe!')
- self.estado_inicial = estado
- def agregar_estado_final(self, estado):
- if estado not in self.estados:
- raise RuntimeError('Ese estado NO existe!')
- def agregar_estado(self, estado):
- if estado in self.estados:
- raise RuntimeError('Ese estado YA existe!')
- self.estados.add(estado)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement