From a7210ecf63ceec43a9878d9226f9f7d6f96e4fa9 Mon Sep 17 00:00:00 2001 From: krimzon1232 <119003596+krimzon1232@users.noreply.github.com> Date: Fri, 17 Oct 2025 16:36:06 +0000 Subject: [PATCH 1/5] lec2_dops --- lec2_dop1.py | 11 +++++++++++ lec2_dop2.py | 10 ++++++++++ lec2_test1.py | 5 +++++ lec2_test2.py | 12 ++++++++++++ lec_dop3.py | 2 ++ lec_dop4.py | 15 +++++++++++++++ lec_dop5.py | 14 ++++++++++++++ lec_dop6.py | 7 +++++++ 8 files changed, 76 insertions(+) create mode 100644 lec2_dop1.py create mode 100644 lec2_dop2.py create mode 100644 lec2_test1.py create mode 100644 lec2_test2.py create mode 100644 lec_dop3.py create mode 100644 lec_dop4.py create mode 100644 lec_dop5.py create mode 100644 lec_dop6.py diff --git a/lec2_dop1.py b/lec2_dop1.py new file mode 100644 index 000000000..ae47bea3e --- /dev/null +++ b/lec2_dop1.py @@ -0,0 +1,11 @@ +a, b, c=map(float, input("Введите a b c через пробел: ").split()) + +d = b**2 - 4*a*c + +if d > 0: + print((-b + d**0.5)/(2*a)) + print((-b - d**0.5)/(2*a)) +if d == 0: + print((-b + d**0.5)/(2*a)) +if d <0: + print("нет корней") \ No newline at end of file diff --git a/lec2_dop2.py b/lec2_dop2.py new file mode 100644 index 000000000..6bca6a779 --- /dev/null +++ b/lec2_dop2.py @@ -0,0 +1,10 @@ +a, b, c=map(float, input("Введите a b c через пробел: ").split()) + +if a Date: Thu, 23 Oct 2025 20:41:46 +0200 Subject: [PATCH 2/5] Home work lec 2 --- lec_test3.py | 5 +++++ lec_test5.py | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 lec_test3.py create mode 100644 lec_test5.py diff --git a/lec_test3.py b/lec_test3.py new file mode 100644 index 000000000..0a26c32ff --- /dev/null +++ b/lec_test3.py @@ -0,0 +1,5 @@ +year = int(input("Введите год: ")) +if year % 4 == 0: + print("весокостный") +else: + print("Не весоконый") \ No newline at end of file diff --git a/lec_test5.py b/lec_test5.py new file mode 100644 index 000000000..5ad02b393 --- /dev/null +++ b/lec_test5.py @@ -0,0 +1,4 @@ +a, b = map(float, input("введите 2 числа через пробел: ").split()) +if b == 0: print("На 0 делить нельзя") +elif a % b == 0: print(f"{a} делится на {b}\nОстаток = {a%b}\nЧастное = {a/b}") +elif a % b != 0: print(f"{a} не делится на {b}\nОстаток = {a%b}\nЧастное = {a/b}") \ No newline at end of file From 7c501d9264ce41428af6fa556d9f60254b499c90 Mon Sep 17 00:00:00 2001 From: krimzon1232 <119003596+krimzon1232@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:28:07 +0000 Subject: [PATCH 3/5] p --- lec_dop4.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lec_dop4.py b/lec_dop4.py index b62be5c4f..99b78c19f 100644 --- a/lec_dop4.py +++ b/lec_dop4.py @@ -1,6 +1,7 @@ n = int(input("Vvedite chislo: ")) c2 = 0 c3 = 0 +c5=0 c7 = 0 while n % 2 == 0: c2 +=1 @@ -8,8 +9,11 @@ while n % 3 == 0: c3+=1 n = n/3 +while n % 5 == 0: + c5+=1 + n = n/5 while n % 7 == 0: c7+=1 n = n/7 -print(f"2: {c2} 3: {c3} 7: {c7}") \ No newline at end of file +print(f"2: {c2}; 3: {c3}; 5: {c5}; 7: {c7}") \ No newline at end of file From 3b6acbe1ea49d16728f11300b22840cddb60fe26 Mon Sep 17 00:00:00 2001 From: krimzon1232 <119003596+krimzon1232@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:29:49 +0000 Subject: [PATCH 4/5] gghgh From 5ce5b491734a318a27ab002d7c2c2ee9b22a495e Mon Sep 17 00:00:00 2001 From: krimzon1232 <119003596+krimzon1232@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:31:08 +0000 Subject: [PATCH 5/5] abobas --- p.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 p.py diff --git a/p.py b/p.py new file mode 100644 index 000000000..d6087b262 --- /dev/null +++ b/p.py @@ -0,0 +1 @@ +jghgyujh \ No newline at end of file