From 08ed000cd2520662230c65ea9b6c325b3a9964db Mon Sep 17 00:00:00 2001 From: = <=> Date: Tue, 3 Nov 2020 13:52:41 +0100 Subject: [PATCH] make doesn't work --- TaskA01/Makefile | 1 + TaskA01/run.py | 18 ++++++++++++++++++ TaskA02/Makefile | 0 TaskA03/Makefile | 0 TaskA04/Makefile | 0 5 files changed, 19 insertions(+) create mode 100644 TaskA01/Makefile create mode 100644 TaskA01/run.py create mode 100644 TaskA02/Makefile create mode 100644 TaskA03/Makefile create mode 100644 TaskA04/Makefile diff --git a/TaskA01/Makefile b/TaskA01/Makefile new file mode 100644 index 0000000..49cbc49 --- /dev/null +++ b/TaskA01/Makefile @@ -0,0 +1 @@ +shakespeare.res \ No newline at end of file diff --git a/TaskA01/run.py b/TaskA01/run.py new file mode 100644 index 0000000..f36e92c --- /dev/null +++ b/TaskA01/run.py @@ -0,0 +1,18 @@ + +import sys + + +def is_hamlet_in_line(line): + if 'Hamlet' in line: + return True + else: + return False + + +file1 = open("shakespeare.res", "a") + + +for line in sys.stdin: + if is_hamlet_in_line(line): + file1.write(line) + print(line.rstrip('\n')) diff --git a/TaskA02/Makefile b/TaskA02/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/TaskA03/Makefile b/TaskA03/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/TaskA04/Makefile b/TaskA04/Makefile new file mode 100644 index 0000000..e69de29