diff --git a/TaskA01/TaskAO1.py b/TaskA01/TaskAO1.py deleted file mode 100644 index c2790ff..0000000 --- a/TaskA01/TaskAO1.py +++ /dev/null @@ -1,44 +0,0 @@ -import re - - -def openFile(fileName,hamletArray = ['H','a', 'm', 'l', 'e', 't'], hamletFullWord = r'Hamlet'): - with open(fileName, "r", encoding="utf-8") as file: - file_contents = file.read() - repCounter = 0 - line = '' - counter = 0 - checkWord = '' - - index = 0 - length = len(file_contents) - while index < length: - character = file_contents[index] - line += character - - if len(checkWord) < len(hamletFullWord): - if re.match(hamletArray[counter], character): - checkWord+=character - counter += 1 - else: - checkWord = '' - counter = 0 - - if character=='\n': - if checkWord=='Hamlet': - print(line) - line = '' - counter = 0 - checkWord = '' - - index+=1 - - -# -print('---------------------SHAKESPEARE.EXP--------------------------------------') -openFile('shakespeare.exp') -print('----------------------SHAKESPEARE.EXP-----------------------------------') -openFile('shakespeare.in') -print('------------------------SIMPLE.IN------------------------------------') -openFile('simple.in') -print('-----------------------SIMPLE.EXP--------------------------------------') -openFile('simple.exp') \ No newline at end of file diff --git a/TaskA01/Task1.py b/TaskA01/run.py similarity index 100% rename from TaskA01/Task1.py rename to TaskA01/run.py diff --git a/TaskA02/Task2.py b/TaskA02/run.py similarity index 100% rename from TaskA02/Task2.py rename to TaskA02/run.py diff --git a/TaskA02/test.py b/TaskA02/test.py deleted file mode 100644 index b3c7cd7..0000000 --- a/TaskA02/test.py +++ /dev/null @@ -1,2 +0,0 @@ -str = r'[Pp ]ies ' -print(len(str)) \ No newline at end of file diff --git a/TaskA03/TaskAO3.py b/TaskA03/run.py similarity index 100% rename from TaskA03/TaskAO3.py rename to TaskA03/run.py