import matplotlib.pyplot as plt
class Name:
def __init__(self):
self.__A = [1, 1]
def Pn(self, a):
self.__A = [self.__A[0] + a, self.__A[1]]
def Pi(self, a):
self.__A = [self.__A[0], self.__A[1] + a]
def Mn(self, a):
self.__A = [self.__A[0] * a, self.__A[1] * a]
def Mi(self, a):
self.__A = [-self.__A[1] * a, self.__A[0] * a]
def go(self):
plt.scatter(self.__A[0], self.__A[1])
plt.xlim(-10,10)
plt.ylim(-10,10)
plt.grid()
plt.show()
To embed this project on your website, copy the following code and paste it into your website's HTML: