This commit is contained in:
Pawel Felcyn 2024-01-08 14:14:27 +01:00
parent b1e6a2a7f8
commit 53ac53201c
4 changed files with 72 additions and 0 deletions

18
TaskE08/run.py Normal file
View File

@ -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

18
TaskE09/run.py Normal file
View File

@ -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

18
TaskE12/run.py Normal file
View File

@ -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

18
TaskE19/run.py Normal file
View File

@ -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