From aa926375abce4715dfca79250847a1080004295f Mon Sep 17 00:00:00 2001 From: = <=> Date: Sat, 7 Nov 2020 21:14:44 +0100 Subject: [PATCH] added A02 task --- TaskA02/Makefile | 0 TaskA02/run | 2 ++ TaskA02/run.py | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 TaskA02/Makefile create mode 100644 TaskA02/run create mode 100644 TaskA02/run.py diff --git a/TaskA02/Makefile b/TaskA02/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/TaskA02/run b/TaskA02/run new file mode 100644 index 0000000..80baa5c --- /dev/null +++ b/TaskA02/run @@ -0,0 +1,2 @@ +#!/bin/bash +python TaskA02/run.py "$@" \ No newline at end of file diff --git a/TaskA02/run.py b/TaskA02/run.py new file mode 100644 index 0000000..d93e05a --- /dev/null +++ b/TaskA02/run.py @@ -0,0 +1,16 @@ +import sys + + +def is_pies_in_lin(line): + line = line.lower().rstrip('\n') + line_array = line.split(' ') + # print(line_array) + if 'pies' in line_array: + return True + else: + return False + + +for line in sys.stdin: + if is_pies_in_lin(line): + print(line.rstrip('\n'))