This commit is contained in:
2026-04-18 14:42:00 +05:00
commit ef77f101fa
96 changed files with 3134 additions and 0 deletions

14
labPython/lab6/Graf13.py Executable file
View File

@@ -0,0 +1,14 @@
import numpy as nu
import matplotlib.pyplot as plt
def xycomlete(x):
y = nu.sin(5 * x) * nu.cos(x)
return y
ArrayX = nu.arange(0, 3, 0.01)
ArrayY = xycomlete(ArrayX)
plt.plot(ArrayX, ArrayY)
plt.show()

13
labPython/lab6/Matr7.py Executable file
View File

@@ -0,0 +1,13 @@
from numpy import array, full, fill_diagonal, fliplr
count = int(input("введите число строк в матрице (nxn): "))
if count%2!=1:
count+=1
Array = full((count, count), ".")
new_diag = ["*" for _ in range(count)]
fill_diagonal(Array, new_diag)
Array = fliplr(Array)
fill_diagonal(Array, new_diag)
Array = fliplr(Array)
print (Array)

4
labPython/lab6/Slice12.py Executable file
View File

@@ -0,0 +1,4 @@
from numpy import random
arrayTriple = random.randint(0, 47, (6, 86, 8))
print(arrayTriple)

7
labPython/lab6/task5_5_1.py Executable file
View File

@@ -0,0 +1,7 @@
import matplotlib.pyplot as plt
plt.pie(
[10, 8, 6, 4, 2],
labels=["Москва", "Санкт-Петербург", "Сочи", "Казань", "Калининград"],
)
plt.show()

12
labPython/lab6/task5_5_2.py Executable file
View File

@@ -0,0 +1,12 @@
import numpy as np
import matplotlib.pyplot as plt
num_points = 1200
x = np.random.uniform(-5.2, 20.7, num_points)
y = np.random.uniform(-5.2, 20.7, num_points)
plt.figure(figsize=(8, 8))
plt.scatter(x, y, color="green", s=10, alpha=0.6)
plt.grid(True)
plt.show()