diff --git a/lesson_1/Pyton file.pyi b/lesson_1/Pyton file.pyi new file mode 100644 index 0000000..e69de29 diff --git a/lesson_1/task 3.py b/lesson_1/task 3.py new file mode 100644 index 0000000..e8fff22 --- /dev/null +++ b/lesson_1/task 3.py @@ -0,0 +1,6 @@ +x = input().split() +elems = [] +for i in x: + i = float(i) + elems.append(abs(int(i))) +print(elems) \ No newline at end of file diff --git a/lesson_1/task1.py b/lesson_1/task1.py new file mode 100644 index 0000000..6fcbfb7 --- /dev/null +++ b/lesson_1/task1.py @@ -0,0 +1,5 @@ +strka = input() +elems = [] +for i in strka: + elems.append(int(i)) +print(sum(elems)) \ No newline at end of file diff --git a/lesson_1/task2.py b/lesson_1/task2.py new file mode 100644 index 0000000..77c683a --- /dev/null +++ b/lesson_1/task2.py @@ -0,0 +1,8 @@ +message = input() +while True: + A = list(input().split('->')) + if len(A) == 0: + break + else: + message = message.replace(A[0], A[1]) +print(message) \ No newline at end of file diff --git a/lesson_1/task4.py b/lesson_1/task4.py new file mode 100644 index 0000000..bfd682d --- /dev/null +++ b/lesson_1/task4.py @@ -0,0 +1,2 @@ +input = input().split() +print(sum(float(n) ** 2 for n in input)) \ No newline at end of file diff --git a/lesson_1/task5.py b/lesson_1/task5.py new file mode 100644 index 0000000..e69de29