From 3da15894af038bc67c43151846a945a64d528794 Mon Sep 17 00:00:00 2001 From: olystrel <46057808+olystrel@users.noreply.github.com> Date: Fri, 11 Jan 2019 23:31:04 +0100 Subject: [PATCH 1/5] easy level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Решение easy level --- lesson01_easy.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lesson01_easy.py diff --git a/lesson01_easy.py b/lesson01_easy.py new file mode 100644 index 0000000..183aec7 --- /dev/null +++ b/lesson01_easy.py @@ -0,0 +1,25 @@ +_author_='Olga_Strelenko' + +#Задача1 + +number = int(input(' Введите число ')) +for i in str(number): + print(i) + +#Задача2 + +answer_user= input('Введите данные ' ) +answer_user1= input('Введите данные1 ') +answer_change = '' +answer_change = answer_user +answer_user=answer_user1 +answer_user1= answer_change +print(answer_user, answer_user1) + + +#Задача3 +age=int(input('Введите свой возраст ')) +if age >= 18: + print('Доступ разрешен') +else: + print('Извините, пользование данным ресурсом только с 18 лет') From e3a41c06f87e67916a06ac9047ebea9425b7d095 Mon Sep 17 00:00:00 2001 From: olystrel <46057808+olystrel@users.noreply.github.com> Date: Fri, 11 Jan 2019 23:32:47 +0100 Subject: [PATCH 2/5] normal level ex.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Решение normal level ex.1 --- lesson01_normal_1.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lesson01_normal_1.py diff --git a/lesson01_normal_1.py b/lesson01_normal_1.py new file mode 100644 index 0000000..a90c0a2 --- /dev/null +++ b/lesson01_normal_1.py @@ -0,0 +1,6 @@ +_author_='Olga_Strelenko' + +#normal +#Задание1 +number = input('Введите число ') +print(max(number)) From 81e513b85c8e3b3b99054289a7a0c55b7bd20109 Mon Sep 17 00:00:00 2001 From: olystrel <46057808+olystrel@users.noreply.github.com> Date: Fri, 11 Jan 2019 23:34:15 +0100 Subject: [PATCH 3/5] normal level ex.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Решение normal level ex.2 --- cat lesson01_normal_2.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 cat lesson01_normal_2.py diff --git a/cat lesson01_normal_2.py b/cat lesson01_normal_2.py new file mode 100644 index 0000000..1921e97 --- /dev/null +++ b/cat lesson01_normal_2.py @@ -0,0 +1,12 @@ +_author_='Olga_Strelenko' + +#Задание2 + +answer = input('Введите данные ' ) +answer1 = input('Введите данные1 ' ) + +answer,answer1 = answer1,answer + +number= (answer,answer1) +print(number [0]) +print(number [1]) From c6abe32726ca34e60f5261d13a2594a72672f21e Mon Sep 17 00:00:00 2001 From: olystrel <46057808+olystrel@users.noreply.github.com> Date: Fri, 11 Jan 2019 23:36:09 +0100 Subject: [PATCH 4/5] normal level ex.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Решение normal level ex.3 --- lesson01_normal_3.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lesson01_normal_3.py diff --git a/lesson01_normal_3.py b/lesson01_normal_3.py new file mode 100644 index 0000000..4d39789 --- /dev/null +++ b/lesson01_normal_3.py @@ -0,0 +1,21 @@ +_author_='Olga_Strelenko' + +#задание3 + +print("Введите коэффициенты для квадратного уравнения (ax^2 + bx + c = 0):") +a = float(input("a = ")) +b = float(input("b = ")) +c = float(input("c = ")) + +discr = b**2 - 4 * a * c; +print("Дискриминант D = %.2f" % discr) +if discr > 0: + import math + x1 = (-b + math.sqrt(discr)) / (2 * a) + x2 = (-b - math.sqrt(discr)) / (2 * a) + print("x1 = %.2f \nx2 = %.2f" % (x1, x2)) +elif discr == 0: + x = -b / (2 * a) + print("x = %.2f" % x) +else: + print("Корней нет") From c2c701b39d374ae591b8540c65c3d86be012c819 Mon Sep 17 00:00:00 2001 From: olystrel <46057808+olystrel@users.noreply.github.com> Date: Fri, 11 Jan 2019 23:37:09 +0100 Subject: [PATCH 5/5] hard level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Решение hard level --- lesson01_hard.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lesson01_hard.py diff --git a/lesson01_hard.py b/lesson01_hard.py new file mode 100644 index 0000000..931fe87 --- /dev/null +++ b/lesson01_hard.py @@ -0,0 +1,10 @@ +#Заданиеhard +a = float("inf") +if a== a**2: + print(True) +if a== a*2: + print(True) +if a > 999999: + print(True) + +print(a)