diff --git a/README.md b/README.md index 714ee32..83d6eca 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Вот сюда нужно будет в первой работе с гитом добавит свое ФИО -## ФИО +## Тютина Анастасия Антоновна ## Работа с репозиторием 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 diff --git a/python/src/main.py b/python/src/main.py index e37a77c..060f873 100644 --- a/python/src/main.py +++ b/python/src/main.py @@ -1,7 +1,29 @@ -def summ(a: int, b: int) -> int: +def summ(a: int, b:int) -> int: return a + b -if __name__ == "__main__": - print("Hello world") +if __name__ == "_main_": + print("Hello World") print(summ(3, 4)) + + +import math +# задача под А + +def y(x): + y = ((math.log(a + x))/((a + x) ** 2)) + return y + + +x = 1.2 +X = 4.2 +while x < X: + a = 2.0 + print(y(x)) + 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