From 53e785882c00e062c11506b72f345b504bef0936 Mon Sep 17 00:00:00 2001 From: nicoleternytska Date: Mon, 23 Dec 2019 20:36:30 +0200 Subject: [PATCH] ready_to_review --- ternytskano/first/task1.py | 13 +++++++++++++ ternytskano/first/task2.py | 4 ++++ ternytskano/first/task3.py | 4 ++++ ternytskano/second/task1.py | 14 ++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 ternytskano/first/task1.py create mode 100644 ternytskano/first/task2.py create mode 100644 ternytskano/first/task3.py create mode 100644 ternytskano/second/task1.py 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