import math
import matplotlib.pyplot as plt

a = 4   # 桁数を少し減らす(16だと過剰)
b = 3
x = [i * (10 ** -a) for i in range(1, 10 ** b)]
y = [1-(1 - i)**10 for i in x]

plt.plot(x, y)

plt.title("y = sin(1 - x) / x")

plt.ylabel("y")
plt.grid(True, linestyle='--', color='gray', alpha=0.5)
plt.axhline(1, color='red', linestyle=':', label='y = 1')
plt.legend()
plt.show()

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: