diff --git a/TaskE08/run.py b/TaskE08/run.py new file mode 100644 index 0000000..20b1a53 --- /dev/null +++ b/TaskE08/run.py @@ -0,0 +1,18 @@ +import re + +def check_number_divisible_by_5(input_string): + pattern = r'^(hi){2,}\!*$' + + if re.match(pattern, input_string): + print('yes') + else: + print('no') + +if __name__ == "__main__": + try: + while True: + line = input() + check_number_divisible_by_5(line) + + except EOFError: + pass diff --git a/TaskE09/run.py b/TaskE09/run.py new file mode 100644 index 0000000..288cc1f --- /dev/null +++ b/TaskE09/run.py @@ -0,0 +1,18 @@ +import re + +def check_number_divisible_by_5(input_string): + pattern = r'.*[A-Z]\d{2}.*' + + if re.match(pattern, input_string): + print('yes') + else: + print('no') + +if __name__ == "__main__": + try: + while True: + line = input() + check_number_divisible_by_5(line) + + except EOFError: + pass diff --git a/TaskE12/run.py b/TaskE12/run.py new file mode 100644 index 0000000..16cc725 --- /dev/null +++ b/TaskE12/run.py @@ -0,0 +1,18 @@ +import re + +def check_number_divisible_by_5(input_string): + pattern = r'^(?!1-500-56773-4323)\d-\d{3}-\d{5}-\d{4}$' + + if re.match(pattern, input_string): + print('yes') + else: + print('no') + +if __name__ == "__main__": + try: + while True: + line = input() + check_number_divisible_by_5(line) + + except EOFError: + pass diff --git a/TaskE19/run.py b/TaskE19/run.py new file mode 100644 index 0000000..f130564 --- /dev/null +++ b/TaskE19/run.py @@ -0,0 +1,18 @@ +import re + +def check_number_divisible_by_5(input_string): + pattern = r'^1(00)+$' + + if re.match(pattern, input_string): + print('yes') + else: + print('no') + +if __name__ == "__main__": + try: + while True: + line = input() + check_number_divisible_by_5(line) + + except EOFError: + pass