Last active
June 27, 2022 07:05
-
-
Save avivijay19/839c1a41a66d4ca2769aacf13dbbf7b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dfa import * | |
from scan_input_file import * | |
dfa = scan_input_file("dfa.txt") | |
given_word = None | |
while given_word != '-1': | |
given_word = input('Type a word (-1 to exit): ') | |
if given_word == '-1': | |
print('\nExiting...') | |
else: | |
if dfa.check_word(given_word): | |
print('\tWord is valid\n') | |
else: | |
print('\tWord is NOT valid\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment