diff --git a/ternytskano/first/task1.py b/ternytskano/first/task1.py new file mode 100644 index 0000000..33d4c5f --- /dev/null +++ b/ternytskano/first/task1.py @@ -0,0 +1,13 @@ +""" +Вивести кількість цілих чисел у списку + +""" + + +my_list = ['qwert', 'abc', 3, 4.09, 7, 10, 'rtt'] +counter = 0 +for el in my_list: + if isinstance(int) == int: + counter +=1 +print(counter) + diff --git a/ternytskano/first/task2.py b/ternytskano/first/task2.py new file mode 100644 index 0000000..77a1443 --- /dev/null +++ b/ternytskano/first/task2.py @@ -0,0 +1,4 @@ +""" +Вивести слова в нижньому регістрі + +""" \ No newline at end of file diff --git a/ternytskano/first/task3.py b/ternytskano/first/task3.py new file mode 100644 index 0000000..422a166 --- /dev/null +++ b/ternytskano/first/task3.py @@ -0,0 +1,4 @@ +""" +Знайти середне значення чисел у заданому користувачем діапазоні + +""" \ No newline at end of file diff --git a/ternytskano/second/task1.py b/ternytskano/second/task1.py new file mode 100644 index 0000000..dff6887 --- /dev/null +++ b/ternytskano/second/task1.py @@ -0,0 +1,14 @@ +""" +Користувач вводить число до 4000. Вивести число римськими цифрами. + +""" + + + +import re +def if_numb(text): + text = re.match(r'^[^4][\d]{1,3}',text) +def val_numb(): + while not if_numb(): + print("input number") +number = val_numb() \ No newline at end of file