diff --git a/TEMA7/p1.png b/TEMA7/p1.png new file mode 100644 index 0000000..95b8e99 Binary files /dev/null and b/TEMA7/p1.png differ diff --git a/TEMA7/p2.png b/TEMA7/p2.png new file mode 100644 index 0000000..a044eb1 Binary files /dev/null and b/TEMA7/p2.png differ diff --git a/TEMA7/p3.png b/TEMA7/p3.png new file mode 100644 index 0000000..5920a2a Binary files /dev/null and b/TEMA7/p3.png differ diff --git a/TEMA7/test.md b/TEMA7/test.md new file mode 100644 index 0000000..ca66699 --- /dev/null +++ b/TEMA7/test.md @@ -0,0 +1,68 @@ +\# Индивидуальное задание по теме 7 + + + +Турханов Артем, А-03-23 + + + +\## Работа в текстовом редакторе Python (вариант 6) + +```py + +import random + +f = open('test.txt', 'w') + +ls = \[random.uniform(-5,12) for i in range(100)] + +def func(x, A, B): + +  if x > A: return B + +  elif (x >= 0) and (x <= A): + +  return (2\*B\*x/A - B\*(x\*\*2/A\*\*2)) + +  elif (x > (A\*(-1))) and (x < 0): + +  return (2\*B\*x/A + B\*(x\*\*2/A\*\*2)) + +  else: return (-1)\*B + + + +f.write('xi | yi\\n') + +f.write('A = 5, B = 7\\n') + +for x in ls: + +  f.write('{} | {}\\n'.format(x, func(x, 5, 7))) + + + +f.write('A = 3, B = 1\\n') + +for x in ls: + +  f.write('{} | {}\\n'.format(x, func(x, 3, 1))) + + + +f.write('A = 4, B = 3\\n') + +for x in ls: + +  f.write('{} | {}\\n'.format(x, func(x, 4, 3))) + +f.close() + +``` + +!\[p1.png](p1.png) + +!\[p2.png](p2.png) + +!\[p3.png](p3.png) +