From 08c1e997fb3182f55c2e6f3f3132ff96a580d96c Mon Sep 17 00:00:00 2001 From: TyutinaAnastasia <118107695+TyutinaAnastasia@users.noreply.github.com> Date: Sun, 13 Nov 2022 14:11:51 +0300 Subject: [PATCH 1/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 714ee32..83d6eca 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Вот сюда нужно будет в первой работе с гитом добавит свое ФИО -## ФИО +## Тютина Анастасия Антоновна ## Работа с репозиторием From c71ffb9abfa546310f8940a3762a4a4ed159c508 Mon Sep 17 00:00:00 2001 From: TyutinaAnastasia <nasty.tyutina@yandex.ru> Date: Sun, 13 Nov 2022 16:05:32 +0300 Subject: [PATCH 2/7] lab 19 --- python/src/main.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/python/src/main.py b/python/src/main.py index e37a77c..fa5b410 100644 --- a/python/src/main.py +++ b/python/src/main.py @@ -1,7 +1,27 @@ -def summ(a: int, b: int) -> int: - return a + b +import math +i = 0 -if __name__ == "__main__": - print("Hello world") - print(summ(3, 4)) + +def frange(start, stop, step): + i = start + while i < stop: + yield i + i += step + + +def y(x): + y = ((math.log(a + x)) / ((a + x) ** 2)) + return y + + +for x in frange(1.2, 4.2, 0.6): + a = 2.0 + print(y(x)) +print() +xrange = [1.16, 1.32, 1.47, 1.65, 1.93] +xlen = len(xrange) +for i in range(0, xlen): + x = xrange[i] + a = 2.0 + print(y(x)) \ No newline at end of file From 516328d187386b0fb1f89d01e18cbf8bf9794c25 Mon Sep 17 00:00:00 2001 From: TyutinaAnastasia <nasty.tyutina@yandex.ru> Date: Sun, 13 Nov 2022 16:10:48 +0300 Subject: [PATCH 3/7] lab19 --- python/src/main.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/python/src/main.py b/python/src/main.py index fa5b410..bef33b7 100644 --- a/python/src/main.py +++ b/python/src/main.py @@ -1,8 +1,5 @@ import math - i = 0 - - def frange(start, stop, step): i = start while i < stop: From 56fe64b21b3ff8b9091cc54c74d82f68696237d9 Mon Sep 17 00:00:00 2001 From: TyutinaAnastasia <nasty.tyutina@yandex.ru> Date: Tue, 6 Dec 2022 21:53:53 +0300 Subject: [PATCH 4/7] =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/src/main.py | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/python/src/main.py b/python/src/main.py index bef33b7..110afb2 100644 --- a/python/src/main.py +++ b/python/src/main.py @@ -1,24 +1,29 @@ import math -i = 0 -def frange(start, stop, step): - i = start - while i < stop: - yield i - i += step +def summ(a: int, b:int) -> int: + return a + b +if __name__ == "_main_": + print("Hello World") + print(summ(3, 4)) + + +# Задача под А + def y(x): - y = ((math.log(a + x)) / ((a + x) ** 2)) + y = ((math.log(a + x))/((a + x) ** 2)) return y -for x in frange(1.2, 4.2, 0.6): +x = 1.2 +X = 4.2 +while x < X: a = 2.0 print(y(x)) -print() -xrange = [1.16, 1.32, 1.47, 1.65, 1.93] -xlen = len(xrange) -for i in range(0, xlen): - x = xrange[i] - a = 2.0 - print(y(x)) \ No newline at end of file + x += 0.6 + +# Задача под B +A = [1.16, 1.32, 1.47, 1.65, 1.93] +a = 2.0 +for x in A: + print (y(x)) \ No newline at end of file From 85d3dd016c945b2713887c7db01848f42f5045b5 Mon Sep 17 00:00:00 2001 From: TyutinaAnastasia <nasty.tyutina@yandex.ru> Date: Tue, 6 Dec 2022 22:22:00 +0300 Subject: [PATCH 5/7] lab19 --- python/src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/src/main.py b/python/src/main.py index 110afb2..aacc1eb 100644 --- a/python/src/main.py +++ b/python/src/main.py @@ -1,4 +1,3 @@ -import math def summ(a: int, b:int) -> int: return a + b @@ -8,6 +7,7 @@ def summ(a: int, b:int) -> int: print(summ(3, 4)) +import math # Задача под А def y(x): From db163c5010ad691cd7aea3219bdf73208b752ee2 Mon Sep 17 00:00:00 2001 From: TyutinaAnastasia <nasty.tyutina@yandex.ru> Date: Tue, 6 Dec 2022 22:24:46 +0300 Subject: [PATCH 6/7] lab19 --- python/src/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/src/main.py b/python/src/main.py index aacc1eb..060f873 100644 --- a/python/src/main.py +++ b/python/src/main.py @@ -8,7 +8,7 @@ def summ(a: int, b:int) -> int: import math -# Задача под А +# задача под А def y(x): y = ((math.log(a + x))/((a + x) ** 2)) @@ -22,7 +22,7 @@ def y(x): print(y(x)) x += 0.6 -# Задача под B +# задача под B A = [1.16, 1.32, 1.47, 1.65, 1.93] a = 2.0 for x in A: From b960499b21da313db4faac4f885ad00cdb5e0861 Mon Sep 17 00:00:00 2001 From: TyutinaAnastasia <nasty.tyutina@yandex.ru> Date: Wed, 7 Dec 2022 12:19:59 +0300 Subject: [PATCH 7/7] codewrs --- python/src/codewrs.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 python/src/codewrs.py diff --git a/python/src/codewrs.py b/python/src/codewrs.py new file mode 100644 index 0000000..ed21d03 --- /dev/null +++ b/python/src/codewrs.py @@ -0,0 +1,34 @@ +def even_or_odd(number): + if number % 2 == 0: + return "even" + else: + return "odd" + + +def count_sheep(sheep): + count = 0 + for i in sheep: + if i == True: + count += 1 + return count + + +def count_monkey(n): + res = [] + for i1 in range(1, n + 1): + res.append(i1) + return res + + +def paper(n, m): + if n > 0 and m > 0: + return n*m + else: + return 0 + + +def hero(dragon, bullet): + if bullet >= dragon*2: + return True + else: + return False \ No newline at end of file