From 2ea60fb663df046b6909bad06178f66cb7ae3fb2 Mon Sep 17 00:00:00 2001 From: joker Date: Wed, 15 Nov 2023 13:08:25 +0300 Subject: [PATCH] modified: content/posts/informatics/class-10g.mdx modified: content/posts/informatics/class-10v.mdx --- content/posts/informatics/class-10g.mdx | 35 ++++++++++++++++++++++++- content/posts/informatics/class-10v.mdx | 27 ++++++++++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/content/posts/informatics/class-10g.mdx b/content/posts/informatics/class-10g.mdx index 7edb621..2636ec9 100644 --- a/content/posts/informatics/class-10g.mdx +++ b/content/posts/informatics/class-10g.mdx @@ -1,6 +1,6 @@ --- title: Классная работа 10Г -excerpt: Все, что показывал в классе тут есть. +excerpt: Все, что показывал в классе тут. date: '2023-11-09' tags: - Информатика @@ -93,3 +93,36 @@ def drive(v,t,s): if s == 0: return (float(t*v)) ~~~ + + +## Урок 15.11.23 + +~~~python +# main.py +from mylib import speed + +f = 45 + +mas = [[5,0,67],[67,0,200],[43,0,45]] + +summ = 0 + +for i in range(len(mas)): + summ = summ + speed(mas[i][0],mas[i][1],mas[i][2]) +print(summ) + +~~~ + +~~~python +# mylib.py + +def speed(v,t,s): + summ = 0 + if v == 0: + summ = (s/t) + if t == 0: + summ = (s/v) + if s == 0: + summ = (t*v) + return summ +~~~ \ No newline at end of file diff --git a/content/posts/informatics/class-10v.mdx b/content/posts/informatics/class-10v.mdx index 6a7b3f7..d7d68cb 100644 --- a/content/posts/informatics/class-10v.mdx +++ b/content/posts/informatics/class-10v.mdx @@ -1,6 +1,6 @@ --- title: Классная работа 10В -excerpt: Все, что показывал в классе тут есть. +excerpt: Все, что показывал в классе тут. date: '2023-11-09' tags: - Информатика @@ -86,4 +86,29 @@ def speed(v,t,s): if s == 0: summ = (t*v) return summ +~~~ + +## Урок 15.11.23 + +~~~python +# main.py +from mylib import strength_elasticity + +mas = [[0, 200, 45], [56, 0, 8], [234, 14, 0]] + +for i in range(len(mas)): + print(strength_elasticity(mas[i][0],mas[i][1],mas[i][2])) +~~~ + +~~~python +# mylib.py + +def strength_elasticity(f, x, k): + if f == 0: + return k*x + if x == 0: + return f/k + if k == 0: + return f/x + ~~~ \ No newline at end of file