all working
This commit is contained in:
parent
146303e482
commit
ea4aea9091
@ -47,6 +47,7 @@ class FSA():
|
|||||||
|
|
||||||
if not found_function:
|
if not found_function:
|
||||||
self.current_state = '0'
|
self.current_state = '0'
|
||||||
|
output_text = ""
|
||||||
else:
|
else:
|
||||||
self.current_state = found_function['out']
|
self.current_state = found_function['out']
|
||||||
output_text += found_function['letter']
|
output_text += found_function['letter']
|
||||||
@ -67,7 +68,7 @@ FSA = FSA()
|
|||||||
# else:
|
# else:
|
||||||
# FSA.specify_end_state(line[0])
|
# FSA.specify_end_state(line[0])
|
||||||
|
|
||||||
lines = ['Scene V. Inverness. A Room in Macbeth’s Castle']
|
lines = ['My name’s Macbeth.']
|
||||||
|
|
||||||
for line in sys.stdin:
|
for line in sys.stdin:
|
||||||
line = line.rstrip('\n')
|
line = line.rstrip('\n')
|
||||||
|
169443
TaskE04/shakespeare.in
169443
TaskE04/shakespeare.in
File diff suppressed because it is too large
Load Diff
@ -40,7 +40,7 @@ class FSA():
|
|||||||
for letter in text:
|
for letter in text:
|
||||||
if letter not in self.alphabet:
|
if letter not in self.alphabet:
|
||||||
return 'NO'
|
return 'NO'
|
||||||
|
|
||||||
found_function = None
|
found_function = None
|
||||||
|
|
||||||
for func in self.transition_function:
|
for func in self.transition_function:
|
||||||
|
Loading…
Reference in New Issue
Block a user