From 46ec84e1ee8e882f00b042fc5eff68c7c62bb3fb Mon Sep 17 00:00:00 2001 From: IgnBys Date: Wed, 8 Nov 2023 19:00:27 +0100 Subject: [PATCH] TaskB00 and TaskB01 were edited --- TaskB00/run.py | 12 ++++++------ TaskB01/READ_HowToRun.txt | 2 ++ TaskB01/run.py | 12 ++++++------ TaskB01/test.out | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 TaskB01/READ_HowToRun.txt diff --git a/TaskB00/run.py b/TaskB00/run.py index 3223f6f..8c3a719 100644 --- a/TaskB00/run.py +++ b/TaskB00/run.py @@ -9,12 +9,12 @@ def find_next_position(position, character): if position == line[0] and character == line[2]: return True,line[1] -used_table = 'fsa_description.arg' -input_file = 'test1.in' -output_file = 'test1.out' -# used_table = sys.argv[1] -# input_file = sys.argv[2] -# output_file = sys.argv[3] +# used_table = 'fsa_description.arg' +# input_file = 'test1.in' +# output_file = 'test1.out' +used_table = sys.argv[1] +input_file = sys.argv[2] +output_file = sys.argv[3] with open(output_file, 'w') as readed_output_file: with open(input_file, 'r') as readed_input_file: for row_input_file in readed_input_file: diff --git a/TaskB01/READ_HowToRun.txt b/TaskB01/READ_HowToRun.txt new file mode 100644 index 0000000..dc4021e --- /dev/null +++ b/TaskB01/READ_HowToRun.txt @@ -0,0 +1,2 @@ +If you use windows please write this command in terminal: +python .\run.py .\fsa_description.arg .\test.in .\test.out \ No newline at end of file diff --git a/TaskB01/run.py b/TaskB01/run.py index 773a91d..964dc24 100644 --- a/TaskB01/run.py +++ b/TaskB01/run.py @@ -9,12 +9,12 @@ def find_next_position(position, character): if position == line[0] and character == line[2]: return True,line[1] -used_table = 'fsa_description.arg' -input_file = 'test.in' -output_file = 'test.out' -# used_table = sys.argv[1] -# input_file = sys.argv[2] -# output_file = sys.argv[3] +# used_table = 'fsa_description.arg' +# input_file = 'test.in' +# output_file = 'test.out' +used_table = sys.argv[1] +input_file = sys.argv[2] +output_file = sys.argv[3] with open(output_file, 'w') as readed_output_file: with open(input_file, 'r') as readed_input_file: for row_input_file in readed_input_file: diff --git a/TaskB01/test.out b/TaskB01/test.out index 484228a..e35a5ab 100644 --- a/TaskB01/test.out +++ b/TaskB01/test.out @@ -1,4 +1,4 @@ -YES +сYES NO YES NO