Files
ktn01/7-1.py
2025-12-03 08:59:14 +03:00

17 lines
330 B
Python

import numpy as np
import matplotlib.pyplot as plt
# Define the dimensions of the trapezoid
base1 = 5
base2 = 3
height = 4
# Plot the trapezoid
trap_points = np.array([[0, 0], [base1, 0], [base1, height], [0, height]])
plt.fill(trap_points[:, 0], trap_points[:, 1], color='gray')
# Show the plot
plt.axis('scaled')
plt.show()