all working

This commit is contained in:
Adam 2020-12-20 11:32:30 +01:00
parent 146303e482
commit ea4aea9091
3 changed files with 169445 additions and 3 deletions

View File

@ -47,6 +47,7 @@ class FSA():
if not found_function:
self.current_state = '0'
output_text = ""
else:
self.current_state = found_function['out']
output_text += found_function['letter']
@ -67,7 +68,7 @@ FSA = FSA()
# else:
# FSA.specify_end_state(line[0])
lines = ['Scene V. Inverness. A Room in Macbeths Castle']
lines = ['My names Macbeth.']
for line in sys.stdin:
line = line.rstrip('\n')

File diff suppressed because it is too large Load Diff

View File

@ -40,7 +40,7 @@ class FSA():
for letter in text:
if letter not in self.alphabet:
return 'NO'
found_function = None
for func in self.transition_function: