From fa142f084c1b1bc7d58f6542d0ec7e60b67b678b Mon Sep 17 00:00:00 2001 From: s450026 Date: Sun, 15 Nov 2020 16:47:16 +0100 Subject: [PATCH] Zrobiono zadanie C06 --- TaskC06/C06.py | 13 +++++++++++++ TaskC06/Makefile | 0 TaskC06/run | 2 ++ result.csv | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 TaskC06/C06.py create mode 100644 TaskC06/Makefile create mode 100755 TaskC06/run diff --git a/TaskC06/C06.py b/TaskC06/C06.py new file mode 100644 index 0000000..180ed72 --- /dev/null +++ b/TaskC06/C06.py @@ -0,0 +1,13 @@ +import re +import sys + + +def line_digits_correct(line): + return re.search('^([1-9](\d{4}|\d{5}))$', line) + + +for line in sys.stdin: + if line_digits_correct(line): + print('yes') + else: + print('no') diff --git a/TaskC06/Makefile b/TaskC06/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/TaskC06/run b/TaskC06/run new file mode 100755 index 0000000..cb1d2e7 --- /dev/null +++ b/TaskC06/run @@ -0,0 +1,2 @@ +#!/bin/bash +python3 TaskC06/C06.py "$@" \ No newline at end of file diff --git a/result.csv b/result.csv index bd83fb6..de66ea1 100644 --- a/result.csv +++ b/result.csv @@ -1,2 +1,2 @@ POINTS -10 +12