From a846e3484d457f90dca4ac0b52e23041b8ee4faf Mon Sep 17 00:00:00 2001 From: Elvirience Date: Sun, 10 Oct 2021 12:24:42 +0300 Subject: [PATCH 01/45] Add homework1.py --- homework1.py | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 homework1.py diff --git a/homework1.py b/homework1.py new file mode 100644 index 0000000..cb0430b --- /dev/null +++ b/homework1.py @@ -0,0 +1,95 @@ +""" +Индекс в названии функции соответствует номеру задания +""" +""" +Для демонстрации работы функций следуйте инструкции после запуска программы +""" + + +def num1(): + a = None + b = 1 + c = 1.7 + print(f'a = {a}, b = {b}, c = {c}') + a = input(f'a = ') + b = input(f'b = ') + c = input(f'c = ') + print(f'a = {a}, b = {b}, c = {c}') + + +def num2(): + t = int(input(f'Введите время в секундах: ')) + ts = t%60 + tm = int(t/60)%60 + th = int(t/3600) + print(f'{th}:{tm}:{ts}') + + +def num3(): + n = input('Введите число: ') + nn = str(n+n) + nnn = str(n+n+n) + a = int(n) + b = int(nn) + c = int(nnn) + print(int(a + b + c)) + + +def num4(): + n = int(input(f'Введите целое положительное число: ')) + var = 0 + while n != 0: + m = n % 10 + if m > var: + var = m + n = n // 10 + print(f'Наибольшая цифра в числе: {var}') + + +def num5(): + p = int(input('Введите сумму выручки: ')) + c = int(input('Введите сумму издержек: ')) + if p > c: + print('Фиксируем прибыль') + print(f'Рентабельность: {(p - c) / p}') + num = int(input('Введите число работников: ')) + print(f'Прибыль на сотрудника компании составляет: {(p - c) / num}') + else: + print('Терпим убытки') + + +def num6(): + a = float(input('Рекорд: ')) + b = float(input('Цель: ')) + count = 0 + i = 1 + while a <= b: + print(f'{i}-ый день: {a:.{3}f}') + a = a + a * 10 / 100 + count += 1 + i += 1 + print(f'Результат {a:.{3}f} км будет достигнут на {count} день') + + +answer = '' +while answer != 'n': + answer = input('Начнем? (y/n): ') + if answer == 'y': + q = '' + while q != ' ': + q = input('Введите номер задания или пробел: ') + if q == '1': + num1() + elif q == '2': + num2() + elif q == '3': + num3() + elif q == '4': + num4() + elif q == '5': + num5() + elif q == '6': + num6() + else: + print('Некорректный ввод') + From f500be74ba0dff4dfe9ce873015e456184a989ce Mon Sep 17 00:00:00 2001 From: Elvirience Date: Sun, 10 Oct 2021 12:39:23 +0300 Subject: [PATCH 02/45] made some changes --- homework1.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homework1.py b/homework1.py index cb0430b..4ebea71 100644 --- a/homework1.py +++ b/homework1.py @@ -1,4 +1,7 @@ """ +Выполнил: Агеев Георгий (BigData 1795) +""" +""" Индекс в названии функции соответствует номеру задания """ """ From 041fe50ecc00e1e42c6d607c5e892684b1ea645a Mon Sep 17 00:00:00 2001 From: Elvirience Date: Sun, 10 Oct 2021 12:55:11 +0300 Subject: [PATCH 03/45] full complect --- .idea/.gitignore | 3 +++ .idea/GU_BigData_1795.iml | 8 ++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/misc.xml | 4 ++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ 6 files changed, 35 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/GU_BigData_1795.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/GU_BigData_1795.iml b/.idea/GU_BigData_1795.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/GU_BigData_1795.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..84958fa --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..1648bd0 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 5f5676f70e31c0d0bc15a19f5bdbc0aece68ccdd Mon Sep 17 00:00:00 2001 From: Elvirience Date: Sat, 23 Oct 2021 16:47:26 +0300 Subject: [PATCH 04/45] new homework --- homework4.py | 0 lesson4/homework4.py | 110 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 homework4.py create mode 100644 lesson4/homework4.py diff --git a/homework4.py b/homework4.py new file mode 100644 index 0000000..e69de29 diff --git a/lesson4/homework4.py b/lesson4/homework4.py new file mode 100644 index 0000000..09d63c3 --- /dev/null +++ b/lesson4/homework4.py @@ -0,0 +1,110 @@ +from functools import reduce +from itertools import count, cycle +from sys import argv +from random import randrange + + +""" +Номер 1 +""" +name, hours, money_in_hour, prize = argv +salary = int(money_in_hour) * int(hours) + int(prize) +print(salary) + + +def num2(i=0): + new_list = [] + len_list = randrange(20) + my_gen = [randrange(20) for i in range(len_list)] + print(my_gen) + try: + while i != (len_list - 1): + if my_gen[i] < my_gen[i + 1]: + new_list.append(my_gen[i + 1]) + i += 1 + except IndexError: + print(new_list) + else: + print(new_list) + + +def num3(): + gen = (i for i in range(20, 241) if i % 20 == 0 or i % 21 == 0) + return gen + + +def num4(): + len_gen = randrange(20) + gen = [randrange(20) for i in range(len_gen)] + print(gen) + new_gen = [el for el in gen if gen.count(el) == 1] + return new_gen + + +def num5(): + gen = [i for i in range(100, 1001) if i%2 == 0] + print(gen) + return reduce(lambda a, b: a * b, gen) + + +def num6_1(a, b, c): + for i in count(a, b): + if i >= c: + break + yield i + + +def num6_2(my_list, steps, counter=0): + for i in cycle(my_list): + """ + steps*len(my_list) - число шагов в одном обороте "cycle()" + """ + if counter >= steps*len(my_list): + break + yield i + counter += 1 + + +def num7(n, a=1): + for i in range(1, n+1): + a *= i + yield a + + +""" +main(): +""" +q = ' ' +while q != '': + q = input('Введите номер задания или нажмите ENTER: ') + if q == '1': + print(f'Заработная плата: {salary}') + elif q == '2': + num2() + elif q == '3': + for el in num3(): + print(el) + elif q == '4': + print(num4()) + elif q == '5': + print(num5()) + elif q == '6.1': + a = int(input('Стартовое число: ')) + b = int(input('Шаг: ')) + c = int(input('Предел: ')) + for el in num6_1(a, b, c): + print(el) + elif q == '6.2': + my_list = [] + el = input('Введите элемент списка или ENTER: ') + while el != '': + my_list.append(el) + el = input('Введите элемент списка или ENTER: ') + print('Оборот - полное прохождение "cycle()" по аргументу-списку') + steps = int(input('Введите число оборотов "cycle()": ')) + for el in num6_2(my_list, steps, 0): + print(el) + elif q == '7': + n = int(input('Найти фаториал числа: ')) + for el in num7(n): + print(el) From 85714cbe67e1415c55a953c646b1eeb27b3ca077 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sat, 23 Oct 2021 16:48:47 +0300 Subject: [PATCH 05/45] Delete .gitignore --- .idea/.gitignore | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml From 92c43d0f0fc2a2ebfa1aaa69facc93daa47ad3c9 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sat, 23 Oct 2021 16:48:54 +0300 Subject: [PATCH 06/45] Delete GU_BigData_1795.iml --- .idea/GU_BigData_1795.iml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/GU_BigData_1795.iml diff --git a/.idea/GU_BigData_1795.iml b/.idea/GU_BigData_1795.iml deleted file mode 100644 index d0876a7..0000000 --- a/.idea/GU_BigData_1795.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From db745c2e096b73d506bb8c76e6d9400e26ffd3e6 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sat, 23 Oct 2021 16:49:00 +0300 Subject: [PATCH 07/45] Delete misc.xml --- .idea/misc.xml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .idea/misc.xml diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 84958fa..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From dca6fdd9cb95e04bcb4d4c78c024a99216442a8f Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sat, 23 Oct 2021 16:49:09 +0300 Subject: [PATCH 08/45] Delete vcs.xml --- .idea/vcs.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 714e1fee7957df40bcdb6281c5f363a9c901a503 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sat, 23 Oct 2021 16:49:25 +0300 Subject: [PATCH 09/45] Delete homework1.py --- homework1.py | 98 ---------------------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 homework1.py diff --git a/homework1.py b/homework1.py deleted file mode 100644 index 4ebea71..0000000 --- a/homework1.py +++ /dev/null @@ -1,98 +0,0 @@ -""" -Выполнил: Агеев Георгий (BigData 1795) -""" -""" -Индекс в названии функции соответствует номеру задания -""" -""" -Для демонстрации работы функций следуйте инструкции после запуска программы -""" - - -def num1(): - a = None - b = 1 - c = 1.7 - print(f'a = {a}, b = {b}, c = {c}') - a = input(f'a = ') - b = input(f'b = ') - c = input(f'c = ') - print(f'a = {a}, b = {b}, c = {c}') - - -def num2(): - t = int(input(f'Введите время в секундах: ')) - ts = t%60 - tm = int(t/60)%60 - th = int(t/3600) - print(f'{th}:{tm}:{ts}') - - -def num3(): - n = input('Введите число: ') - nn = str(n+n) - nnn = str(n+n+n) - a = int(n) - b = int(nn) - c = int(nnn) - print(int(a + b + c)) - - -def num4(): - n = int(input(f'Введите целое положительное число: ')) - var = 0 - while n != 0: - m = n % 10 - if m > var: - var = m - n = n // 10 - print(f'Наибольшая цифра в числе: {var}') - - -def num5(): - p = int(input('Введите сумму выручки: ')) - c = int(input('Введите сумму издержек: ')) - if p > c: - print('Фиксируем прибыль') - print(f'Рентабельность: {(p - c) / p}') - num = int(input('Введите число работников: ')) - print(f'Прибыль на сотрудника компании составляет: {(p - c) / num}') - else: - print('Терпим убытки') - - -def num6(): - a = float(input('Рекорд: ')) - b = float(input('Цель: ')) - count = 0 - i = 1 - while a <= b: - print(f'{i}-ый день: {a:.{3}f}') - a = a + a * 10 / 100 - count += 1 - i += 1 - print(f'Результат {a:.{3}f} км будет достигнут на {count} день') - - -answer = '' -while answer != 'n': - answer = input('Начнем? (y/n): ') - if answer == 'y': - q = '' - while q != ' ': - q = input('Введите номер задания или пробел: ') - if q == '1': - num1() - elif q == '2': - num2() - elif q == '3': - num3() - elif q == '4': - num4() - elif q == '5': - num5() - elif q == '6': - num6() - else: - print('Некорректный ввод') - From 3cbe562e26b156221594ac8f867743b947b0e268 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sat, 23 Oct 2021 16:49:41 +0300 Subject: [PATCH 10/45] Delete modules.xml --- .idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/modules.xml diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 1648bd0..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 2df76dce712ceb2716369622adc5e39e3a4aa836 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sat, 23 Oct 2021 16:49:51 +0300 Subject: [PATCH 11/45] Delete profiles_settings.xml --- .idea/inspectionProfiles/profiles_settings.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From 722346dd4517866eed2586e81f655e0954f075af Mon Sep 17 00:00:00 2001 From: Elvirience Date: Sat, 23 Oct 2021 16:52:16 +0300 Subject: [PATCH 12/45] update --- lesson4/homework4.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lesson4/homework4.py b/lesson4/homework4.py index 09d63c3..412b469 100644 --- a/lesson4/homework4.py +++ b/lesson4/homework4.py @@ -4,6 +4,18 @@ from random import randrange +""" +Индекс в названии функции соответствует номеру задания +""" +""" +Для демонстрации работы функций следуйте инструкции после запуска программы +""" +""" +ВНИМАНИЕ! +Для 6-го задания предусмотрены варианты ввода: 6.1 - для обратоки слова, 6.2 - для обработки нескольких слов +""" + + """ Номер 1 """ From 4d6d50c913c449314bd284604e52b5bbb321dccd Mon Sep 17 00:00:00 2001 From: Elvirience Date: Sat, 23 Oct 2021 16:55:42 +0300 Subject: [PATCH 13/45] update --- lesson4/homework4.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lesson4/homework4.py b/lesson4/homework4.py index 412b469..22700b9 100644 --- a/lesson4/homework4.py +++ b/lesson4/homework4.py @@ -11,8 +11,7 @@ Для демонстрации работы функций следуйте инструкции после запуска программы """ """ -ВНИМАНИЕ! -Для 6-го задания предусмотрены варианты ввода: 6.1 - для обратоки слова, 6.2 - для обработки нескольких слов +Для 6-го задания предусмотрены варианты ввода: 6.1, 6.2 """ From 0a469eecfbfd895ac574cf2e860191e43f5984c2 Mon Sep 17 00:00:00 2001 From: Elvirience Date: Sun, 24 Oct 2021 11:07:16 +0300 Subject: [PATCH 14/45] updates --- .idea/BigData.iml | 12 + .idea/misc.xml | 2 +- .idea/modules.xml | 2 +- .idea/workspace.xml | 82 +++++++ README.md | 1 - lesson1/.idea/.gitignore | 0 .../.idea/homework1.iml | 0 .../inspectionProfiles/profiles_settings.xml | 6 + lesson1/.idea/misc.xml | 4 + lesson1/.idea/modules.xml | 8 + lesson1/.idea/workspace.xml | 53 +++++ homework1.py => lesson1/homework1.py | 13 +- {.idea => lesson2/.idea}/.gitignore | 0 lesson2/.idea/homework2.iml | 8 + .../inspectionProfiles/profiles_settings.xml | 6 + lesson2/.idea/misc.xml | 4 + lesson2/.idea/modules.xml | 8 + lesson2/homework2.py | 206 ++++++++++++++++++ lesson3/.idea/.gitignore | 3 + lesson3/.idea/BigData.iml | 8 + .../inspectionProfiles/profiles_settings.xml | 6 + lesson3/.idea/misc.xml | 4 + lesson3/.idea/modules.xml | 8 + lesson3/homework3.py | 170 +++++++++++++++ lesson4/.idea/BigData.iml | 10 + .../inspectionProfiles/profiles_settings.xml | 6 + lesson4/.idea/misc.xml | 4 + lesson4/.idea/modules.xml | 8 + lesson4/.idea/vcs.xml | 6 + lesson4/.idea/workspace.xml | 49 +++++ 30 files changed, 687 insertions(+), 10 deletions(-) create mode 100644 .idea/BigData.iml create mode 100644 .idea/workspace.xml delete mode 100644 README.md create mode 100644 lesson1/.idea/.gitignore rename .idea/GU_BigData_1795.iml => lesson1/.idea/homework1.iml (100%) create mode 100644 lesson1/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 lesson1/.idea/misc.xml create mode 100644 lesson1/.idea/modules.xml create mode 100644 lesson1/.idea/workspace.xml rename homework1.py => lesson1/homework1.py (93%) rename {.idea => lesson2/.idea}/.gitignore (100%) create mode 100644 lesson2/.idea/homework2.iml create mode 100644 lesson2/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 lesson2/.idea/misc.xml create mode 100644 lesson2/.idea/modules.xml create mode 100644 lesson2/homework2.py create mode 100644 lesson3/.idea/.gitignore create mode 100644 lesson3/.idea/BigData.iml create mode 100644 lesson3/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 lesson3/.idea/misc.xml create mode 100644 lesson3/.idea/modules.xml create mode 100644 lesson3/homework3.py create mode 100644 lesson4/.idea/BigData.iml create mode 100644 lesson4/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 lesson4/.idea/misc.xml create mode 100644 lesson4/.idea/modules.xml create mode 100644 lesson4/.idea/vcs.xml create mode 100644 lesson4/.idea/workspace.xml diff --git a/.idea/BigData.iml b/.idea/BigData.iml new file mode 100644 index 0000000..8b8c395 --- /dev/null +++ b/.idea/BigData.iml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 84958fa..096b0f3 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 1648bd0..964f100 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..8aa7cb3 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1634885950324 + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 68abb7b..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# GU_BigData_1795 \ No newline at end of file diff --git a/lesson1/.idea/.gitignore b/lesson1/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.idea/GU_BigData_1795.iml b/lesson1/.idea/homework1.iml similarity index 100% rename from .idea/GU_BigData_1795.iml rename to lesson1/.idea/homework1.iml diff --git a/lesson1/.idea/inspectionProfiles/profiles_settings.xml b/lesson1/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/lesson1/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/lesson1/.idea/misc.xml b/lesson1/.idea/misc.xml new file mode 100644 index 0000000..d56657a --- /dev/null +++ b/lesson1/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/lesson1/.idea/modules.xml b/lesson1/.idea/modules.xml new file mode 100644 index 0000000..b3868b4 --- /dev/null +++ b/lesson1/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/lesson1/.idea/workspace.xml b/lesson1/.idea/workspace.xml new file mode 100644 index 0000000..f342665 --- /dev/null +++ b/lesson1/.idea/workspace.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + 1634490503476 + + + + \ No newline at end of file diff --git a/homework1.py b/lesson1/homework1.py similarity index 93% rename from homework1.py rename to lesson1/homework1.py index 4ebea71..0af32c9 100644 --- a/homework1.py +++ b/lesson1/homework1.py @@ -1,5 +1,5 @@ """ -Выполнил: Агеев Георгий (BigData 1795) +Выполнил: Агеев Георгий (AI 1781) """ """ Индекс в названии функции соответствует номеру задания @@ -14,9 +14,9 @@ def num1(): b = 1 c = 1.7 print(f'a = {a}, b = {b}, c = {c}') - a = input(f'a = ') - b = input(f'b = ') - c = input(f'c = ') + a = input('a = ') + b = input('b = ') + c = input('c = ') print(f'a = {a}, b = {b}, c = {c}') @@ -30,8 +30,8 @@ def num2(): def num3(): n = input('Введите число: ') - nn = str(n+n) - nnn = str(n+n+n) + nn = n+n + nnn = n+n+n a = int(n) b = int(nn) c = int(nnn) @@ -95,4 +95,3 @@ def num6(): num6() else: print('Некорректный ввод') - diff --git a/.idea/.gitignore b/lesson2/.idea/.gitignore similarity index 100% rename from .idea/.gitignore rename to lesson2/.idea/.gitignore diff --git a/lesson2/.idea/homework2.iml b/lesson2/.idea/homework2.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/lesson2/.idea/homework2.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/lesson2/.idea/inspectionProfiles/profiles_settings.xml b/lesson2/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/lesson2/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/lesson2/.idea/misc.xml b/lesson2/.idea/misc.xml new file mode 100644 index 0000000..d56657a --- /dev/null +++ b/lesson2/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/lesson2/.idea/modules.xml b/lesson2/.idea/modules.xml new file mode 100644 index 0000000..de00548 --- /dev/null +++ b/lesson2/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/lesson2/homework2.py b/lesson2/homework2.py new file mode 100644 index 0000000..ec8835d --- /dev/null +++ b/lesson2/homework2.py @@ -0,0 +1,206 @@ +""" +Выполнил: Агеев Георгий (AI 1781) +""" +""" +Индекс в названии функции соответствует номеру задания +""" +""" +Для демонстрации работы функций следуйте инструкции после запуска программы +""" + + +def num1(): + my_list = [] + type_list = [] + el = input('Введите элемент списка: ') + while el != '': + my_list.append(el) + if el.isdigit() is True: + el = int(el) + """ + Если не int, то str либо и есть str, либо float, либо содержит признаки обоих типов + """ + else: + """ + Проверим str на соответсвие float + str является float, если выполняются три признака + Плавающая точка - первый признак типа float, + Второй - она только одна + """ + check = el.split('.') + """ + Точка делит строку на две части, тогда длина списка "check" должна быть строго равна 2 + Если это не так, то тип данных str + """ + if len(check) == 2: + """ + Третий признак - обе части списка должны состоять только из цифр + Если это не так, то тип данных str + """ + if check[0].isdigit() and check[1].isdigit(): + el = float(el) + else: + break + else: + el = str(el) + type_list.append(type(el)) + el = input('Введите элемент списка: ') + print(f'Исходный список: {my_list}') + print(f'Типовой список: {type_list}') + + +def num2(): + my_list = [] + el = input('Введите элемент списка: ') + while el != '': + my_list.append(el) + el = input('Введите элемент списка: ') + print(f'Исходный список: {my_list}') + i = 0 + while i < len(my_list): + if i == (len(my_list) - 1) and len(my_list) / 2 is not int: + break + """ + вариант через кортеж: + my_list[i], my_list[i+1] = my_list[i+1], my_list[i] + i += 2 + """ + a = my_list[i] + i += 1 + my_list[i - 1] = my_list[i] + my_list[i] = a + i += 1 + print(f'Результат: {my_list}') + + +def num3(): + do = '' + while do != '3': + do = input('Что использовать?\n1.Словарь\t2.Список\t3.Выход\n') + """ + Решение с помощью словаря + """ + if do == '1': + my_dict = {1: 'Jan', 2: 'Feb', 3: 'March', 4: 'April', 5: 'May', 6: 'June', 7: 'July', 8: 'Aug', 9: 'Sept', + 10: 'Oct', 11: 'Nov', 12: 'Dec'} + key = int(input('Введите номер месяца: ')) + if my_dict.get(key) == 12 or 1 or 2: + print(f'{my_dict.get(key)}, время года года - зима') + elif my_dict.get(key) == 3 or 4 or 5: + print(f'{my_dict.get(key)}, время года года - весна') + elif my_dict.get(key) == 6 or 7 or 8: + print(f'{my_dict.get(key)}, время года года - лето') + elif my_dict.get(key) == 9 or 10 or 11: + print(f'{my_dict.get(key)}, время года года - осень') + else: + print('Некорректный ввод') + """ + Решение с помощью списка + """ + elif do == '2': + four_seasons = ['Зима', 'Весна', 'Лето', 'Осень'] + key = int(input('Введите номер месяца: ')) + try: + print(four_seasons[key // 3]) + except IndexError: + print('Зима') + + +def num4(): + string = input('Введите строку: ') + my_list = string.split(' ') + for i in my_list: + print(f'{my_list.index(i) + 1}) {i[0:10]}') + + +def num5(): + my_list = [5, 5, 10, 4, 1, 4, 4, 6, 2, 6, 10, 7] + my_list.sort() + el = input('Введите элемент списка: ') + while el != '': + el = int(el) + try: + pos = my_list.index(el) + except ValueError: + my_list.append(el) + my_list.sort() + else: + my_list.insert(pos, el) + el = input('Введите элемент списка: ') + print(my_list) + my_list.reverse() + print(f'Рейтинговый список:\n{my_list}') + + +""" +"condition" - это функция для условия "if" в заданнии 6. +Она проходит по списку, элементами которого являются кортежи вида: (индекс, словарь), +запрашивает j-ый элемент списка, 1-ый элемент кортежа и переходит таким образом к работе со словарем. +Функцией "my_dict.setdefault(nom))" запрашивает значение, находящееся под ключ-переменной "nom" +и добавляет его в список значений "values". +Полученный список ("values") становится значением нового, локального, словаря "my_dict_local" +с ключом "nom". +В результате работы данной функции получаются словари следующего вида: +“название”: [“компьютер”, “принтер”, “сканер”], +“цена”: [20000, 6000, 2000], +“количество”: [5, 2, 7], +“ед”: [“шт.”] +""" + + +def condition(j, my_list, values, nom): + while j < len(my_list): + values.append(my_list[j][1].setdefault(nom)) + j += 1 + my_dict_local = {nom: values} + print(my_dict_local) + + +def num6(): + my_list = [] + i = 0 + do = '' + print('Выберите действие:') + while do != '3': + do = input('1.Добавить товар\t2.Выборка\t3.Выход\n') + if do == '1': + name = input('Наименование: ') + price = input('Цена: ') + quantity = input('Количество: ') + unit = input('Единица измерения: ') + my_dict = {'Наименование': name, 'Цена': price, 'Количество': quantity, 'ед.': unit} + my_tuple = (i + 1, my_dict) + i += 1 + my_list.append(my_tuple) + elif do == '2': + values = [] + j = 0 + do = input('1.Наименование\n2.Цена\n3.Количество\n4.ед.\n') + if do == '1': + condition(j, my_list, values, 'Наименование') + elif do == '2': + condition(j, my_list, values, 'Цена') + elif do == '3': + condition(j, my_list, values, 'Количество.') + elif do == '4': + condition(j, my_list, values, 'ед.') + + +""" +main(): +""" +q = ' ' +while q != '': + q = input('Введите номер задания или нажмите ENTER: ') + if q == '1': + num1() + elif q == '2': + num2() + elif q == '3': + num3() + elif q == '4': + num4() + elif q == '5': + num5() + elif q == '6': + num6() diff --git a/lesson3/.idea/.gitignore b/lesson3/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/lesson3/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/lesson3/.idea/BigData.iml b/lesson3/.idea/BigData.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/lesson3/.idea/BigData.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/lesson3/.idea/inspectionProfiles/profiles_settings.xml b/lesson3/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/lesson3/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/lesson3/.idea/misc.xml b/lesson3/.idea/misc.xml new file mode 100644 index 0000000..d56657a --- /dev/null +++ b/lesson3/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/lesson3/.idea/modules.xml b/lesson3/.idea/modules.xml new file mode 100644 index 0000000..964f100 --- /dev/null +++ b/lesson3/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/lesson3/homework3.py b/lesson3/homework3.py new file mode 100644 index 0000000..199520e --- /dev/null +++ b/lesson3/homework3.py @@ -0,0 +1,170 @@ +""" +Выполнил: Агеев Георгий (BigData 1795) +""" +""" +Индекс в названии функции соответствует номеру задания +""" +""" +Для демонстрации работы функций следуйте инструкции после запуска программы +""" +""" +ВНИМАНИЕ! +Для 6-го задания предусмотрены варианты ввода: 6.1 - для обратоки слова, 6.2 - для обработки нескольких слов +""" + + +def num1(a, b): + try: + print(a/b) + except ZeroDivisionError: + print('Деление на 0') + print('Попробуте еще раз!') + a = int(input('Числитель = ')) + b = int(input('Знаменатель = ')) + print(a / b) + return a/b + + +def num2(name, nom, born, city, email, number): + print(f'Имя: {name}\tФамилия: {nom}\tГод рождения: {born}\tГород: {city}\te-mail: {email}\tТелефон: {number}\n') + + +def num3(a, b, c, j): + my_list = [a, b, c] + """ + Определяю тип переменной: int или float + """ + for i in my_list: + if i.isdigit() is True: + i = int(i) + else: + check = i.split('.') + if len(check) == 2: + if check[0].isdigit() and check[1].isdigit(): + i = float(i) + my_list[j] = i + j += 1 + """ + Цикл на случай, если решение требует не использовать функцию ".sort()" + """ + """ + j = 0 + while j < 2: + if my_list[j] > my_list[j + 1]: + my_list[j + 1] = my_list[j] + else: + j += 1 + j += 1 + """ + my_list.sort() + print(my_list[1] + my_list[2]) + return my_list[1] + my_list[2] + + +def num4(x, y): + for i in range(abs(y)): + x *= x + print(1 / x) + return 1 / x + + +def num5(string, sum, j): + """ + Суммирование вводимых чисел до того, как попадется специальный символ "q" + """ + while string.count('q') == 0: + my_list = string.split(' ') + for i in my_list: + sum += int(i) + print(sum) + string = input('Введите числа через пробел: ') + string.count('q') + """ + Как только строка содержит специальный символ, происходит суммирование чисел перед ним - работа завершается + """ + my_list = string.split(' ') + while my_list[j] != 'q': + sum += int(my_list[j]) + j += 1 + print(sum) + + +""" +Вспомогательная функция к заданию "6", обрататывающая, по заданию, одно слово +""" + + +def helper(my_string, i): + alphabet = (('a', 'A'), ('b', 'B'), ('c', 'C'), ('d', 'D'), ('e', 'E'), + ('f', 'F'), ('g', 'G'), ('h', 'H'), ('i', 'I'), ('j', 'J'), + ('k', 'K'), ('l', 'L'), ('m', 'M'), ('n', 'N'), ('o', 'O'), + ('p', 'P'), ('q', 'Q'), ('r', 'R'), ('s', 'S'), ('t', 'T'), + ('u', 'U'), ('v', 'V'), ('w', 'W'), ('x', 'X'), ('y', 'Y'), ('z', 'Z')) + while my_string[0] != alphabet[i][0]: + i += 1 + print(alphabet[i][1] + my_string[1:]) + return alphabet[i][1] + my_string[1:] + + +""" +Здание 6.2. Например, вы ввели: aleksandra shapovalova + Результат: Aleksandra + Shapovalova + Aleksandra Shapovalova + Первые две строки отображаются в результате работы функции "helper" +""" + + +def num6(string): + """ + Список, чтобы собрать функцкцией .join() + """ + my_list = [] + """ + Работа функции "helper" над каждым словом строки, введенной пользователем + """ + for j in string.split(' '): + my_list.append(helper(j, 0)) + """ + Сброка получившегося списка в строку + """ + print(' '.join(my_list)) + return ' '.join(my_list) + + +""" +main(): +""" +q = ' ' +while q != '': + q = input('Введите номер задания или нажмите ENTER: ') + if q == '1': + a = int(input('Числитель = ')) + b = int(input('Знаменатель = ')) + num1(a, b) + elif q == '2': + name = input('Имя: ') + nom = input('Фамилия: ') + born = input('Год рождения: ') + city = input('Город: ') + email = input('e-mail: ') + number = input('Телефон: ') + num2(name, nom, born, city, email, number) + elif q == '3': + a = input('a = ') + b = input('b = ') + c = input('c = ') + num3(a, b, c, 0) + elif q == '4': + x = abs(float(input('Введите действительное положительное число: '))) + y = int(input('Введите целое отрицательное число: ')) + num4(x, y) + elif q == '5': + string = input('Введите числа через пробел: ') + num5(string, 0, 0) + elif q == '6.1': + my_string = input('Введите слово из маленьких латинских букв: ') + helper(my_string, 0) + elif q == '6.2': + string = input('Введите слова из маленьких латинских букв: ') + num6(string) diff --git a/lesson4/.idea/BigData.iml b/lesson4/.idea/BigData.iml new file mode 100644 index 0000000..f06d9bd --- /dev/null +++ b/lesson4/.idea/BigData.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/lesson4/.idea/inspectionProfiles/profiles_settings.xml b/lesson4/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/lesson4/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/lesson4/.idea/misc.xml b/lesson4/.idea/misc.xml new file mode 100644 index 0000000..2c92b24 --- /dev/null +++ b/lesson4/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/lesson4/.idea/modules.xml b/lesson4/.idea/modules.xml new file mode 100644 index 0000000..964f100 --- /dev/null +++ b/lesson4/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/lesson4/.idea/vcs.xml b/lesson4/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/lesson4/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lesson4/.idea/workspace.xml b/lesson4/.idea/workspace.xml new file mode 100644 index 0000000..05e0a1e --- /dev/null +++ b/lesson4/.idea/workspace.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1634843454449 + + + + \ No newline at end of file From 93792b8cd05a0c934587b16ab1813aedcaaf766f Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:21:25 +0300 Subject: [PATCH 15/45] Delete BigData.iml --- .idea/BigData.iml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .idea/BigData.iml diff --git a/.idea/BigData.iml b/.idea/BigData.iml deleted file mode 100644 index 8b8c395..0000000 --- a/.idea/BigData.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file From 294d75c47ec6a0e9cf8d45be3b492310b20440dc Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:21:42 +0300 Subject: [PATCH 16/45] Delete misc.xml --- .idea/misc.xml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .idea/misc.xml diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 096b0f3..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From af3fbfb5bfbe5360de14085c51e6aca8ff6dab8d Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:21:53 +0300 Subject: [PATCH 17/45] Delete workspace.xml --- .idea/workspace.xml | 82 --------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 8aa7cb3..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1634885950324 - - - - - - - \ No newline at end of file From 70ea3c5a085edb98a1f89c7bcfcdcbc1e3dde116 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:22:06 +0300 Subject: [PATCH 18/45] Delete homework1.iml --- lesson1/.idea/homework1.iml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 lesson1/.idea/homework1.iml diff --git a/lesson1/.idea/homework1.iml b/lesson1/.idea/homework1.iml deleted file mode 100644 index d0876a7..0000000 --- a/lesson1/.idea/homework1.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 926cc29906e71b43902e000ba4e61b60c7d2b7ae Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:22:17 +0300 Subject: [PATCH 19/45] Delete modules.xml --- .idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/modules.xml diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 964f100..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 5877f022a6576bcd179f4e477a6cae07aa918b78 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:22:51 +0300 Subject: [PATCH 20/45] Delete profiles_settings.xml --- lesson1/.idea/inspectionProfiles/profiles_settings.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 lesson1/.idea/inspectionProfiles/profiles_settings.xml diff --git a/lesson1/.idea/inspectionProfiles/profiles_settings.xml b/lesson1/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/lesson1/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From b94e24f2e3d82596a707ed2af302b45a8b75beb9 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:23:02 +0300 Subject: [PATCH 21/45] Delete workspace.xml --- lesson1/.idea/workspace.xml | 53 ------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 lesson1/.idea/workspace.xml diff --git a/lesson1/.idea/workspace.xml b/lesson1/.idea/workspace.xml deleted file mode 100644 index f342665..0000000 --- a/lesson1/.idea/workspace.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - 1634490503476 - - - - \ No newline at end of file From c0706d0bdbb4b8f8aceb70b65308da66459d1268 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:23:20 +0300 Subject: [PATCH 22/45] Delete homework1.py --- lesson1/homework1.py | 97 -------------------------------------------- 1 file changed, 97 deletions(-) delete mode 100644 lesson1/homework1.py diff --git a/lesson1/homework1.py b/lesson1/homework1.py deleted file mode 100644 index 0af32c9..0000000 --- a/lesson1/homework1.py +++ /dev/null @@ -1,97 +0,0 @@ -""" -Выполнил: Агеев Георгий (AI 1781) -""" -""" -Индекс в названии функции соответствует номеру задания -""" -""" -Для демонстрации работы функций следуйте инструкции после запуска программы -""" - - -def num1(): - a = None - b = 1 - c = 1.7 - print(f'a = {a}, b = {b}, c = {c}') - a = input('a = ') - b = input('b = ') - c = input('c = ') - print(f'a = {a}, b = {b}, c = {c}') - - -def num2(): - t = int(input(f'Введите время в секундах: ')) - ts = t%60 - tm = int(t/60)%60 - th = int(t/3600) - print(f'{th}:{tm}:{ts}') - - -def num3(): - n = input('Введите число: ') - nn = n+n - nnn = n+n+n - a = int(n) - b = int(nn) - c = int(nnn) - print(int(a + b + c)) - - -def num4(): - n = int(input(f'Введите целое положительное число: ')) - var = 0 - while n != 0: - m = n % 10 - if m > var: - var = m - n = n // 10 - print(f'Наибольшая цифра в числе: {var}') - - -def num5(): - p = int(input('Введите сумму выручки: ')) - c = int(input('Введите сумму издержек: ')) - if p > c: - print('Фиксируем прибыль') - print(f'Рентабельность: {(p - c) / p}') - num = int(input('Введите число работников: ')) - print(f'Прибыль на сотрудника компании составляет: {(p - c) / num}') - else: - print('Терпим убытки') - - -def num6(): - a = float(input('Рекорд: ')) - b = float(input('Цель: ')) - count = 0 - i = 1 - while a <= b: - print(f'{i}-ый день: {a:.{3}f}') - a = a + a * 10 / 100 - count += 1 - i += 1 - print(f'Результат {a:.{3}f} км будет достигнут на {count} день') - - -answer = '' -while answer != 'n': - answer = input('Начнем? (y/n): ') - if answer == 'y': - q = '' - while q != ' ': - q = input('Введите номер задания или пробел: ') - if q == '1': - num1() - elif q == '2': - num2() - elif q == '3': - num3() - elif q == '4': - num4() - elif q == '5': - num5() - elif q == '6': - num6() - else: - print('Некорректный ввод') From 4c0336d712a4c37fb9f797d8743c1ce97471978c Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:23:31 +0300 Subject: [PATCH 23/45] Delete .gitignore --- lesson2/.idea/.gitignore | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 lesson2/.idea/.gitignore diff --git a/lesson2/.idea/.gitignore b/lesson2/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/lesson2/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml From a336d1efa6bcb7b42504fe39c102275c21f9b24f Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:23:42 +0300 Subject: [PATCH 24/45] Delete homework2.iml --- lesson2/.idea/homework2.iml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 lesson2/.idea/homework2.iml diff --git a/lesson2/.idea/homework2.iml b/lesson2/.idea/homework2.iml deleted file mode 100644 index d0876a7..0000000 --- a/lesson2/.idea/homework2.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 9b3ed7e58f50a30514763da6bd16f9c5e2a810c2 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:23:51 +0300 Subject: [PATCH 25/45] Delete profiles_settings.xml --- lesson2/.idea/inspectionProfiles/profiles_settings.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 lesson2/.idea/inspectionProfiles/profiles_settings.xml diff --git a/lesson2/.idea/inspectionProfiles/profiles_settings.xml b/lesson2/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/lesson2/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From f7149bbbaa7b5e49dae4d0504771ffe575005b6a Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:24:02 +0300 Subject: [PATCH 26/45] Delete homework2.py --- lesson2/homework2.py | 206 ------------------------------------------- 1 file changed, 206 deletions(-) delete mode 100644 lesson2/homework2.py diff --git a/lesson2/homework2.py b/lesson2/homework2.py deleted file mode 100644 index ec8835d..0000000 --- a/lesson2/homework2.py +++ /dev/null @@ -1,206 +0,0 @@ -""" -Выполнил: Агеев Георгий (AI 1781) -""" -""" -Индекс в названии функции соответствует номеру задания -""" -""" -Для демонстрации работы функций следуйте инструкции после запуска программы -""" - - -def num1(): - my_list = [] - type_list = [] - el = input('Введите элемент списка: ') - while el != '': - my_list.append(el) - if el.isdigit() is True: - el = int(el) - """ - Если не int, то str либо и есть str, либо float, либо содержит признаки обоих типов - """ - else: - """ - Проверим str на соответсвие float - str является float, если выполняются три признака - Плавающая точка - первый признак типа float, - Второй - она только одна - """ - check = el.split('.') - """ - Точка делит строку на две части, тогда длина списка "check" должна быть строго равна 2 - Если это не так, то тип данных str - """ - if len(check) == 2: - """ - Третий признак - обе части списка должны состоять только из цифр - Если это не так, то тип данных str - """ - if check[0].isdigit() and check[1].isdigit(): - el = float(el) - else: - break - else: - el = str(el) - type_list.append(type(el)) - el = input('Введите элемент списка: ') - print(f'Исходный список: {my_list}') - print(f'Типовой список: {type_list}') - - -def num2(): - my_list = [] - el = input('Введите элемент списка: ') - while el != '': - my_list.append(el) - el = input('Введите элемент списка: ') - print(f'Исходный список: {my_list}') - i = 0 - while i < len(my_list): - if i == (len(my_list) - 1) and len(my_list) / 2 is not int: - break - """ - вариант через кортеж: - my_list[i], my_list[i+1] = my_list[i+1], my_list[i] - i += 2 - """ - a = my_list[i] - i += 1 - my_list[i - 1] = my_list[i] - my_list[i] = a - i += 1 - print(f'Результат: {my_list}') - - -def num3(): - do = '' - while do != '3': - do = input('Что использовать?\n1.Словарь\t2.Список\t3.Выход\n') - """ - Решение с помощью словаря - """ - if do == '1': - my_dict = {1: 'Jan', 2: 'Feb', 3: 'March', 4: 'April', 5: 'May', 6: 'June', 7: 'July', 8: 'Aug', 9: 'Sept', - 10: 'Oct', 11: 'Nov', 12: 'Dec'} - key = int(input('Введите номер месяца: ')) - if my_dict.get(key) == 12 or 1 or 2: - print(f'{my_dict.get(key)}, время года года - зима') - elif my_dict.get(key) == 3 or 4 or 5: - print(f'{my_dict.get(key)}, время года года - весна') - elif my_dict.get(key) == 6 or 7 or 8: - print(f'{my_dict.get(key)}, время года года - лето') - elif my_dict.get(key) == 9 or 10 or 11: - print(f'{my_dict.get(key)}, время года года - осень') - else: - print('Некорректный ввод') - """ - Решение с помощью списка - """ - elif do == '2': - four_seasons = ['Зима', 'Весна', 'Лето', 'Осень'] - key = int(input('Введите номер месяца: ')) - try: - print(four_seasons[key // 3]) - except IndexError: - print('Зима') - - -def num4(): - string = input('Введите строку: ') - my_list = string.split(' ') - for i in my_list: - print(f'{my_list.index(i) + 1}) {i[0:10]}') - - -def num5(): - my_list = [5, 5, 10, 4, 1, 4, 4, 6, 2, 6, 10, 7] - my_list.sort() - el = input('Введите элемент списка: ') - while el != '': - el = int(el) - try: - pos = my_list.index(el) - except ValueError: - my_list.append(el) - my_list.sort() - else: - my_list.insert(pos, el) - el = input('Введите элемент списка: ') - print(my_list) - my_list.reverse() - print(f'Рейтинговый список:\n{my_list}') - - -""" -"condition" - это функция для условия "if" в заданнии 6. -Она проходит по списку, элементами которого являются кортежи вида: (индекс, словарь), -запрашивает j-ый элемент списка, 1-ый элемент кортежа и переходит таким образом к работе со словарем. -Функцией "my_dict.setdefault(nom))" запрашивает значение, находящееся под ключ-переменной "nom" -и добавляет его в список значений "values". -Полученный список ("values") становится значением нового, локального, словаря "my_dict_local" -с ключом "nom". -В результате работы данной функции получаются словари следующего вида: -“название”: [“компьютер”, “принтер”, “сканер”], -“цена”: [20000, 6000, 2000], -“количество”: [5, 2, 7], -“ед”: [“шт.”] -""" - - -def condition(j, my_list, values, nom): - while j < len(my_list): - values.append(my_list[j][1].setdefault(nom)) - j += 1 - my_dict_local = {nom: values} - print(my_dict_local) - - -def num6(): - my_list = [] - i = 0 - do = '' - print('Выберите действие:') - while do != '3': - do = input('1.Добавить товар\t2.Выборка\t3.Выход\n') - if do == '1': - name = input('Наименование: ') - price = input('Цена: ') - quantity = input('Количество: ') - unit = input('Единица измерения: ') - my_dict = {'Наименование': name, 'Цена': price, 'Количество': quantity, 'ед.': unit} - my_tuple = (i + 1, my_dict) - i += 1 - my_list.append(my_tuple) - elif do == '2': - values = [] - j = 0 - do = input('1.Наименование\n2.Цена\n3.Количество\n4.ед.\n') - if do == '1': - condition(j, my_list, values, 'Наименование') - elif do == '2': - condition(j, my_list, values, 'Цена') - elif do == '3': - condition(j, my_list, values, 'Количество.') - elif do == '4': - condition(j, my_list, values, 'ед.') - - -""" -main(): -""" -q = ' ' -while q != '': - q = input('Введите номер задания или нажмите ENTER: ') - if q == '1': - num1() - elif q == '2': - num2() - elif q == '3': - num3() - elif q == '4': - num4() - elif q == '5': - num5() - elif q == '6': - num6() From b3abcdeb96873ba19f9a90e73da51f99267d34b1 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:24:17 +0300 Subject: [PATCH 27/45] Delete .gitignore --- lesson3/.idea/.gitignore | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 lesson3/.idea/.gitignore diff --git a/lesson3/.idea/.gitignore b/lesson3/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/lesson3/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml From 71b508c762c85cc28642dab71e16eaad6792784a Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:24:26 +0300 Subject: [PATCH 28/45] Delete profiles_settings.xml --- lesson3/.idea/inspectionProfiles/profiles_settings.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 lesson3/.idea/inspectionProfiles/profiles_settings.xml diff --git a/lesson3/.idea/inspectionProfiles/profiles_settings.xml b/lesson3/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/lesson3/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From 9df5e400005af5345ecdcaffdf705d2ef756175a Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:24:33 +0300 Subject: [PATCH 29/45] Delete modules.xml --- lesson3/.idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 lesson3/.idea/modules.xml diff --git a/lesson3/.idea/modules.xml b/lesson3/.idea/modules.xml deleted file mode 100644 index 964f100..0000000 --- a/lesson3/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 15f43e6bf2677e5e1ebcaf5ca1cd3bd4b50195f8 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:24:42 +0300 Subject: [PATCH 30/45] Delete homework3.py --- lesson3/homework3.py | 170 ------------------------------------------- 1 file changed, 170 deletions(-) delete mode 100644 lesson3/homework3.py diff --git a/lesson3/homework3.py b/lesson3/homework3.py deleted file mode 100644 index 199520e..0000000 --- a/lesson3/homework3.py +++ /dev/null @@ -1,170 +0,0 @@ -""" -Выполнил: Агеев Георгий (BigData 1795) -""" -""" -Индекс в названии функции соответствует номеру задания -""" -""" -Для демонстрации работы функций следуйте инструкции после запуска программы -""" -""" -ВНИМАНИЕ! -Для 6-го задания предусмотрены варианты ввода: 6.1 - для обратоки слова, 6.2 - для обработки нескольких слов -""" - - -def num1(a, b): - try: - print(a/b) - except ZeroDivisionError: - print('Деление на 0') - print('Попробуте еще раз!') - a = int(input('Числитель = ')) - b = int(input('Знаменатель = ')) - print(a / b) - return a/b - - -def num2(name, nom, born, city, email, number): - print(f'Имя: {name}\tФамилия: {nom}\tГод рождения: {born}\tГород: {city}\te-mail: {email}\tТелефон: {number}\n') - - -def num3(a, b, c, j): - my_list = [a, b, c] - """ - Определяю тип переменной: int или float - """ - for i in my_list: - if i.isdigit() is True: - i = int(i) - else: - check = i.split('.') - if len(check) == 2: - if check[0].isdigit() and check[1].isdigit(): - i = float(i) - my_list[j] = i - j += 1 - """ - Цикл на случай, если решение требует не использовать функцию ".sort()" - """ - """ - j = 0 - while j < 2: - if my_list[j] > my_list[j + 1]: - my_list[j + 1] = my_list[j] - else: - j += 1 - j += 1 - """ - my_list.sort() - print(my_list[1] + my_list[2]) - return my_list[1] + my_list[2] - - -def num4(x, y): - for i in range(abs(y)): - x *= x - print(1 / x) - return 1 / x - - -def num5(string, sum, j): - """ - Суммирование вводимых чисел до того, как попадется специальный символ "q" - """ - while string.count('q') == 0: - my_list = string.split(' ') - for i in my_list: - sum += int(i) - print(sum) - string = input('Введите числа через пробел: ') - string.count('q') - """ - Как только строка содержит специальный символ, происходит суммирование чисел перед ним - работа завершается - """ - my_list = string.split(' ') - while my_list[j] != 'q': - sum += int(my_list[j]) - j += 1 - print(sum) - - -""" -Вспомогательная функция к заданию "6", обрататывающая, по заданию, одно слово -""" - - -def helper(my_string, i): - alphabet = (('a', 'A'), ('b', 'B'), ('c', 'C'), ('d', 'D'), ('e', 'E'), - ('f', 'F'), ('g', 'G'), ('h', 'H'), ('i', 'I'), ('j', 'J'), - ('k', 'K'), ('l', 'L'), ('m', 'M'), ('n', 'N'), ('o', 'O'), - ('p', 'P'), ('q', 'Q'), ('r', 'R'), ('s', 'S'), ('t', 'T'), - ('u', 'U'), ('v', 'V'), ('w', 'W'), ('x', 'X'), ('y', 'Y'), ('z', 'Z')) - while my_string[0] != alphabet[i][0]: - i += 1 - print(alphabet[i][1] + my_string[1:]) - return alphabet[i][1] + my_string[1:] - - -""" -Здание 6.2. Например, вы ввели: aleksandra shapovalova - Результат: Aleksandra - Shapovalova - Aleksandra Shapovalova - Первые две строки отображаются в результате работы функции "helper" -""" - - -def num6(string): - """ - Список, чтобы собрать функцкцией .join() - """ - my_list = [] - """ - Работа функции "helper" над каждым словом строки, введенной пользователем - """ - for j in string.split(' '): - my_list.append(helper(j, 0)) - """ - Сброка получившегося списка в строку - """ - print(' '.join(my_list)) - return ' '.join(my_list) - - -""" -main(): -""" -q = ' ' -while q != '': - q = input('Введите номер задания или нажмите ENTER: ') - if q == '1': - a = int(input('Числитель = ')) - b = int(input('Знаменатель = ')) - num1(a, b) - elif q == '2': - name = input('Имя: ') - nom = input('Фамилия: ') - born = input('Год рождения: ') - city = input('Город: ') - email = input('e-mail: ') - number = input('Телефон: ') - num2(name, nom, born, city, email, number) - elif q == '3': - a = input('a = ') - b = input('b = ') - c = input('c = ') - num3(a, b, c, 0) - elif q == '4': - x = abs(float(input('Введите действительное положительное число: '))) - y = int(input('Введите целое отрицательное число: ')) - num4(x, y) - elif q == '5': - string = input('Введите числа через пробел: ') - num5(string, 0, 0) - elif q == '6.1': - my_string = input('Введите слово из маленьких латинских букв: ') - helper(my_string, 0) - elif q == '6.2': - string = input('Введите слова из маленьких латинских букв: ') - num6(string) From e22a203719431928dfd28d4f9a42ecc0a96d6682 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:25:53 +0300 Subject: [PATCH 31/45] Delete homework4.py --- homework4.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 homework4.py diff --git a/homework4.py b/homework4.py deleted file mode 100644 index e69de29..0000000 From d55cb5d7bd9e4e431ce1c4bc046545e01fdfcc54 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:26:01 +0300 Subject: [PATCH 32/45] Delete modules.xml --- lesson1/.idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 lesson1/.idea/modules.xml diff --git a/lesson1/.idea/modules.xml b/lesson1/.idea/modules.xml deleted file mode 100644 index b3868b4..0000000 --- a/lesson1/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 80a517dce32ba679fe105c82dd291661bae7f692 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:26:14 +0300 Subject: [PATCH 33/45] Delete misc.xml --- lesson2/.idea/misc.xml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 lesson2/.idea/misc.xml diff --git a/lesson2/.idea/misc.xml b/lesson2/.idea/misc.xml deleted file mode 100644 index d56657a..0000000 --- a/lesson2/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From 9c54db287bde8e2c61151023557f4e3c9a759b53 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:26:26 +0300 Subject: [PATCH 34/45] Delete profiles_settings.xml --- lesson4/.idea/inspectionProfiles/profiles_settings.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 lesson4/.idea/inspectionProfiles/profiles_settings.xml diff --git a/lesson4/.idea/inspectionProfiles/profiles_settings.xml b/lesson4/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/lesson4/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From f083422be58073b0dc08e28d0a9052efd082d391 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:26:35 +0300 Subject: [PATCH 35/45] Delete misc.xml --- lesson4/.idea/misc.xml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 lesson4/.idea/misc.xml diff --git a/lesson4/.idea/misc.xml b/lesson4/.idea/misc.xml deleted file mode 100644 index 2c92b24..0000000 --- a/lesson4/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From 372dab8d30c9763ec2969069fd0ac8ba2ff64dc9 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:26:50 +0300 Subject: [PATCH 36/45] Delete workspace.xml --- lesson4/.idea/workspace.xml | 49 ------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 lesson4/.idea/workspace.xml diff --git a/lesson4/.idea/workspace.xml b/lesson4/.idea/workspace.xml deleted file mode 100644 index 05e0a1e..0000000 --- a/lesson4/.idea/workspace.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1634843454449 - - - - \ No newline at end of file From c51217951306759d90dcee49baab8f5c09195327 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:27:04 +0300 Subject: [PATCH 37/45] Delete .gitignore --- lesson1/.idea/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 lesson1/.idea/.gitignore diff --git a/lesson1/.idea/.gitignore b/lesson1/.idea/.gitignore deleted file mode 100644 index e69de29..0000000 From 9cbf8fa6e775cbf52d57dc4c0247ab45bbc2775f Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:27:13 +0300 Subject: [PATCH 38/45] Delete misc.xml --- lesson1/.idea/misc.xml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 lesson1/.idea/misc.xml diff --git a/lesson1/.idea/misc.xml b/lesson1/.idea/misc.xml deleted file mode 100644 index d56657a..0000000 --- a/lesson1/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From e6388172792af7b23528e387973332c22007e5df Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:27:22 +0300 Subject: [PATCH 39/45] Delete modules.xml --- lesson2/.idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 lesson2/.idea/modules.xml diff --git a/lesson2/.idea/modules.xml b/lesson2/.idea/modules.xml deleted file mode 100644 index de00548..0000000 --- a/lesson2/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 46469899c33731ef55a373cacddd7d006d1cca22 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:27:30 +0300 Subject: [PATCH 40/45] Delete misc.xml --- lesson3/.idea/misc.xml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 lesson3/.idea/misc.xml diff --git a/lesson3/.idea/misc.xml b/lesson3/.idea/misc.xml deleted file mode 100644 index d56657a..0000000 --- a/lesson3/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From d7e64893e085f84f658ab1adf3846bbe685ee71c Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:27:42 +0300 Subject: [PATCH 41/45] Delete BigData.iml --- lesson3/.idea/BigData.iml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 lesson3/.idea/BigData.iml diff --git a/lesson3/.idea/BigData.iml b/lesson3/.idea/BigData.iml deleted file mode 100644 index d0876a7..0000000 --- a/lesson3/.idea/BigData.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From c1768ec8db50a8a23fd52c88f7c0259112682a66 Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:27:54 +0300 Subject: [PATCH 42/45] Delete BigData.iml --- lesson4/.idea/BigData.iml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 lesson4/.idea/BigData.iml diff --git a/lesson4/.idea/BigData.iml b/lesson4/.idea/BigData.iml deleted file mode 100644 index f06d9bd..0000000 --- a/lesson4/.idea/BigData.iml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file From 498fd9484f7af3316ded965edb07a29f7db7fc5c Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:28:05 +0300 Subject: [PATCH 43/45] Delete modules.xml --- lesson4/.idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 lesson4/.idea/modules.xml diff --git a/lesson4/.idea/modules.xml b/lesson4/.idea/modules.xml deleted file mode 100644 index 964f100..0000000 --- a/lesson4/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From bb9684f9361cd64713bf2f86a1c5d86aca00ee2a Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:28:12 +0300 Subject: [PATCH 44/45] Delete vcs.xml --- lesson4/.idea/vcs.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 lesson4/.idea/vcs.xml diff --git a/lesson4/.idea/vcs.xml b/lesson4/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/lesson4/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 2f88c095c68694e2286645255176fc9f7449365f Mon Sep 17 00:00:00 2001 From: Elvirience <92172008+Elvirience@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:38:32 +0300 Subject: [PATCH 45/45] Update homework4.py --- lesson4/homework4.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lesson4/homework4.py b/lesson4/homework4.py index 22700b9..d599f29 100644 --- a/lesson4/homework4.py +++ b/lesson4/homework4.py @@ -4,6 +4,9 @@ from random import randrange +""" +Выполнил: Агеев Георгий BigData 1795 +""" """ Индекс в названии функции соответствует номеру задания """