From 3ad6e28fc2fc3e7e7404ba20b98b55e9b9f1678a Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Fri, 19 Nov 2021 16:12:57 +0300 Subject: [PATCH 01/12] Lesson4 --- Base_Python/Les1.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Base_Python/Les1.py diff --git a/Base_Python/Les1.py b/Base_Python/Les1.py new file mode 100644 index 0000000..cdbf9c3 --- /dev/null +++ b/Base_Python/Les1.py @@ -0,0 +1,43 @@ +# num=int(input('Введите число:')) +# sum=num+2 +# print(sum) + +# Задача 2. +# Используя цикл, запрашивайте у пользователя число, пока оно не станет больше 0, но меньше 10. + +# while True: +# num=int(input('Введите число')) +# if num>0 and num<10: +# print(num**2) +# break +# else: +# print('Введите число от 0 до 10') + +# Задача 3 +# Создайте программу “Медицинская анкета”, где вы запросите у пользователя следующие данные: имя, фамилия, возраст и вес. +# Выведите результат согласно которому: +# Пациент в хорошем состоянии, если ему до 30 лет и вес от 50 и до 120 кг, +# Пациенту требуется заняться собой, если ему более 30 и вес меньше 50 или больше 120 кг +# Пациенту требуется врачебный осмотр, если ему более 40 и вес менее 50 или больше 120 кг. +# Все остальные варианты вы можете обработать на ваш вкус и полет фантазии. +# Пример: Вася Пупкин, 29 год, вес 90 - хорошее состояние +# Пример: Вася Пупкин, 31 год, вес 121 - следует заняться собой +# Пример: Вася Пупкин, 31 год, вес 49 - следует заняться собой +# Пример: Вася Пупкин, 41 год, вес 121 - следует обратится к врачу! +# Пример: Вася Пупкин, 41 год, вес 49 - следует обратится к врачу! +# +# name=input('Введите имя:') +# syrname=input('Введите фамилию:') +# age=int(input('Введите возраст:')) +# weight=int(input('Введите вес:')) +# +# if age<=30 and (weight<=120 and weight>=50): +# print(name, syrname, age,'год', weight, 'кг','-Хорошее состояние') +# elif age>30 and age<=40 and (weight<50 or weight>120): +# print(name, syrname, age,'год', weight, 'кг' '-Займитесь собой') +# elif age>40 and (weight<50 or weight>120): +# print(name, syrname, age,'год', weight, 'кг', '-Обратитесь к врачу') +# +# else: "Все же сходите ко врачу" (Примечание: можно написать это строчку, но по заданию она не требуется) + + From 86041c274140721e579f76719aa23eb8c56ffb93 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 11:57:27 +0300 Subject: [PATCH 02/12] Lesson4 --- Lesson_4/Les4_Task1.py | 1 + Lesson_5/Les5_Task1.py | 0 2 files changed, 1 insertion(+) create mode 100644 Lesson_5/Les5_Task1.py diff --git a/Lesson_4/Les4_Task1.py b/Lesson_4/Les4_Task1.py index 3ee68e9..dd58872 100644 --- a/Lesson_4/Les4_Task1.py +++ b/Lesson_4/Les4_Task1.py @@ -5,3 +5,4 @@ else: print(f'Salary= {float(argv[1]) * float(argv[2]) + float(argv[3])}') + diff --git a/Lesson_5/Les5_Task1.py b/Lesson_5/Les5_Task1.py new file mode 100644 index 0000000..e69de29 From 568ee77d8a32d868e519338302e92d9b317b6d08 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 11:58:36 +0300 Subject: [PATCH 03/12] Lesson4 --- Lesson_5/Les5_Task1.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Lesson_5/Les5_Task1.py diff --git a/Lesson_5/Les5_Task1.py b/Lesson_5/Les5_Task1.py deleted file mode 100644 index e69de29..0000000 From 23cf358da63b560e61ba82b39b0db7edee7ad865 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 11:59:05 +0300 Subject: [PATCH 04/12] Lesson42 --- Lesson_4/Les4_Task2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lesson_4/Les4_Task2.py b/Lesson_4/Les4_Task2.py index a1545e3..f51e2f4 100644 --- a/Lesson_4/Les4_Task2.py +++ b/Lesson_4/Les4_Task2.py @@ -9,3 +9,4 @@ filtred_list = [my_list[i] for i in range(1, len(my_list)) if my_list[i]>my_list[i-1]] print(filtred_list) + From 5e05fd01e2432eb023010d8c258da64d104b9908 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 12:00:13 +0300 Subject: [PATCH 05/12] Lesson4_3 --- Lesson_4/Les4_Task3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lesson_4/Les4_Task3.py b/Lesson_4/Les4_Task3.py index 613f026..5f7d745 100644 --- a/Lesson_4/Les4_Task3.py +++ b/Lesson_4/Les4_Task3.py @@ -7,3 +7,5 @@ filtred_list = [my_list[i] for i in range(1, len(my_list)) if my_list[i]%20==0 or my_list[i]%21==0] print(filtred_list) + +#Попытка2 \ No newline at end of file From 0878a1533e39651a9e8ca3f17bfb2c431eefb037 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 12:00:45 +0300 Subject: [PATCH 06/12] Lesson4_4 --- Lesson_4/Les4_Task4.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lesson_4/Les4_Task4.py b/Lesson_4/Les4_Task4.py index ff5e8af..da502ec 100644 --- a/Lesson_4/Les4_Task4.py +++ b/Lesson_4/Les4_Task4.py @@ -8,3 +8,4 @@ filtred_list = [ i for i in my_list if my_list.count(i)==1] print(filtred_list) +#Попытка2 From 97016bcfa6265f8ac3b60b16bd9085a8f7ecdd13 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 12:01:15 +0300 Subject: [PATCH 07/12] Lesson4_5 --- Lesson_4/Les4_Task5.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lesson_4/Les4_Task5.py b/Lesson_4/Les4_Task5.py index 2518293..326fa3b 100644 --- a/Lesson_4/Les4_Task5.py +++ b/Lesson_4/Les4_Task5.py @@ -8,4 +8,5 @@ num_list=[i for i in range(100,1001) if i%2==0] total=reduce(lambda x, y: x * y, num_list) -print(total) \ No newline at end of file +print(total) +#попытка2 \ No newline at end of file From c701d5bc6a866d40115544f9099130daa2a7a5a1 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 12:01:44 +0300 Subject: [PATCH 08/12] Lesson4_6 --- Lesson_4/Les4_Task6.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lesson_4/Les4_Task6.py b/Lesson_4/Les4_Task6.py index 7f2d83d..8048ce7 100644 --- a/Lesson_4/Les4_Task6.py +++ b/Lesson_4/Les4_Task6.py @@ -11,4 +11,6 @@ counter += 1 if counter > 10: break - print(i) \ No newline at end of file + print(i) + +#попытка2 \ No newline at end of file From b9e1cf4c9dcd87eefd87da83ca8ccc8fb6044751 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 12:02:07 +0300 Subject: [PATCH 09/12] Lesson4_7 --- Lesson_4/Les4_Task7.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lesson_4/Les4_Task7.py b/Lesson_4/Les4_Task7.py index 8baa8dd..2c1c990 100644 --- a/Lesson_4/Les4_Task7.py +++ b/Lesson_4/Les4_Task7.py @@ -6,3 +6,4 @@ def fact(num): x = 10 for y, z in enumerate(fact(x)): print(f'!{y+1} {z}') +#попытка2 From 8febbc9b1b838e79df98d9d8f42883a336339b6b Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 12:06:13 +0300 Subject: [PATCH 10/12] =?UTF-8?q?Lesson=5F=D1=82=D0=B5=D1=81=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base_Python/Les1.py | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/Base_Python/Les1.py b/Base_Python/Les1.py index cdbf9c3..e69de29 100644 --- a/Base_Python/Les1.py +++ b/Base_Python/Les1.py @@ -1,43 +0,0 @@ -# num=int(input('Введите число:')) -# sum=num+2 -# print(sum) - -# Задача 2. -# Используя цикл, запрашивайте у пользователя число, пока оно не станет больше 0, но меньше 10. - -# while True: -# num=int(input('Введите число')) -# if num>0 and num<10: -# print(num**2) -# break -# else: -# print('Введите число от 0 до 10') - -# Задача 3 -# Создайте программу “Медицинская анкета”, где вы запросите у пользователя следующие данные: имя, фамилия, возраст и вес. -# Выведите результат согласно которому: -# Пациент в хорошем состоянии, если ему до 30 лет и вес от 50 и до 120 кг, -# Пациенту требуется заняться собой, если ему более 30 и вес меньше 50 или больше 120 кг -# Пациенту требуется врачебный осмотр, если ему более 40 и вес менее 50 или больше 120 кг. -# Все остальные варианты вы можете обработать на ваш вкус и полет фантазии. -# Пример: Вася Пупкин, 29 год, вес 90 - хорошее состояние -# Пример: Вася Пупкин, 31 год, вес 121 - следует заняться собой -# Пример: Вася Пупкин, 31 год, вес 49 - следует заняться собой -# Пример: Вася Пупкин, 41 год, вес 121 - следует обратится к врачу! -# Пример: Вася Пупкин, 41 год, вес 49 - следует обратится к врачу! -# -# name=input('Введите имя:') -# syrname=input('Введите фамилию:') -# age=int(input('Введите возраст:')) -# weight=int(input('Введите вес:')) -# -# if age<=30 and (weight<=120 and weight>=50): -# print(name, syrname, age,'год', weight, 'кг','-Хорошее состояние') -# elif age>30 and age<=40 and (weight<50 or weight>120): -# print(name, syrname, age,'год', weight, 'кг' '-Займитесь собой') -# elif age>40 and (weight<50 or weight>120): -# print(name, syrname, age,'год', weight, 'кг', '-Обратитесь к врачу') -# -# else: "Все же сходите ко врачу" (Примечание: можно написать это строчку, но по заданию она не требуется) - - From 71b40167439f51c8060d5b7efa9552a352bb3311 Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Sun, 21 Nov 2021 12:06:56 +0300 Subject: [PATCH 11/12] =?UTF-8?q?Lesson=5F=D1=82=D0=B5=D1=81=D1=82=5F?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base_Python/Les1.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Base_Python/Les1.py diff --git a/Base_Python/Les1.py b/Base_Python/Les1.py deleted file mode 100644 index e69de29..0000000 From eff2e4e869cd55ed66a2a1b438163a4f6b035a2f Mon Sep 17 00:00:00 2001 From: AvokrichA Date: Mon, 22 Nov 2021 23:36:19 +0300 Subject: [PATCH 12/12] Lesson_5 --- Lesson_5/L5_t3.txt | 10 ++++++++++ Lesson_5/Les5_Task1.py | 8 ++++++++ Lesson_5/Les5_Task2.py | 11 +++++++++++ Lesson_5/Les5_Task3.py | 2 ++ Lesson_5/Text.txt | 7 +++++++ 5 files changed, 38 insertions(+) create mode 100644 Lesson_5/L5_t3.txt create mode 100644 Lesson_5/Les5_Task1.py create mode 100644 Lesson_5/Les5_Task2.py create mode 100644 Lesson_5/Les5_Task3.py create mode 100644 Lesson_5/Text.txt diff --git a/Lesson_5/L5_t3.txt b/Lesson_5/L5_t3.txt new file mode 100644 index 0000000..94326f2 --- /dev/null +++ b/Lesson_5/L5_t3.txt @@ -0,0 +1,10 @@ +Иванов 35245.23 +Петров 56325.35 +Чирков 95354.23 +Сидоров 56353.22 +Задорнов 98321.44 +Алексеев 62354.12 +Сергеев 35543.32 +Александров 35435.24 +Владимиров 36533.24 +Смирнов 16355,6 diff --git a/Lesson_5/Les5_Task1.py b/Lesson_5/Les5_Task1.py new file mode 100644 index 0000000..5f5382d --- /dev/null +++ b/Lesson_5/Les5_Task1.py @@ -0,0 +1,8 @@ + +with open("text.txt", 'r') as file_obj: + content = file_obj.read() + end = () + print(content) + for i in content: + print(i) + diff --git a/Lesson_5/Les5_Task2.py b/Lesson_5/Les5_Task2.py new file mode 100644 index 0000000..4053b2b --- /dev/null +++ b/Lesson_5/Les5_Task2.py @@ -0,0 +1,11 @@ + +with open("text.txt", 'r') as file_obj: + content = (file_obj.readlines()) + print('В файле Text',len(content),'строк') + for i in range(len(content)): + content_1 = content[i].split() + print('В', i + 1,'строке', len(content_1), 'слов(а)') + print(content) + + + diff --git a/Lesson_5/Les5_Task3.py b/Lesson_5/Les5_Task3.py new file mode 100644 index 0000000..75c0566 --- /dev/null +++ b/Lesson_5/Les5_Task3.py @@ -0,0 +1,2 @@ +with open('L5_t3.txt', 'r') as my_file: + diff --git a/Lesson_5/Text.txt b/Lesson_5/Text.txt new file mode 100644 index 0000000..60ca598 --- /dev/null +++ b/Lesson_5/Text.txt @@ -0,0 +1,7 @@ +Hello! +My name is Olesia +I am studying at the online university "Geek Brains" +bla-bla +bla bla bla +bla +bla-bla, bla, bla