changed B00 by accident

This commit is contained in:
doasdsk 2023-11-10 20:44:37 +01:00
parent 346db007f5
commit a9af7c98e6
2 changed files with 21 additions and 12 deletions

View File

@ -5,13 +5,13 @@ import sys
# global outputResult
# fsa_description = sys.argv[1]
# inputWords = sys.argv[2]
# outputResult = sys.argv[3]
fsa_description = sys.argv[1]
inputWords = sys.argv[2]
outputResult = sys.argv[3]
fsa_description = "fsa_description.arg"
inputWords = "test1.in"
outputResult = "test1.out"
# fsa_description = "fsa_description.arg"
# inputWords = "test1.in"
# outputResult = "test1.out"
def readDescription(currentPos, charInput):
with open(fsa_description, 'r', encoding="utf-8") as descript:
@ -35,11 +35,11 @@ with open(inputWords, 'r', encoding="utf-8") as inputString:
pos = newPos
print(answersYN)
# with open(outputResult, 'w', encoding="utf-8") as output:
# for i in range(0, len(answersYN)):
# if answersYN[i] == '1':
# output.write("YES\n")
# elif answersYN[i] == '0':
# output.write("NO\n")
with open(outputResult, 'w', encoding="utf-8") as output:
for i in range(0, len(answersYN)):
if answersYN[i] == '1':
output.write("YES\n")
elif answersYN[i] == '0':
output.write("NO\n")

9
TaskB00/test1.out Normal file
View File

@ -0,0 +1,9 @@
NO
YES
NO
NO
NO
NO
NO
NO
NO