import matplotlib.pyplot as plt
import math
from math import comb
def Glaf(f,x):
    d = [n for n in range(x)]
    t = [f(d[n]) for n in range(x)]
    plt.plot(d, t)
    plt.xlabel("x")
    plt.ylabel("y")
    plt.title("y = 2x + 1")
    plt.grid()
    plt.show()
def ListGlaf(y):
    d = [n for n in range(len(y))]
    plt.plot(d, y)
    plt.xlabel("x")
    plt.ylabel("y")
    plt.title("y = 2x + 1")
    plt.grid()
    plt.show()
ListGlaf([comb(6, k) for k in range(7)])
Glaf((lambda p:(p**2)+1),6)
Glaf((lambda p:(math.cos(p))+1),6)


print('Hello world!')

Embed on website

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