import matplotlib.pyplot as plt
from scipy import stats
x = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
y = [4, 7, 11, 16, 22, 29, 38, 49, 63, 80]
def interpolate(x1: float, y1: float, x2: float, y2: float, x: float):
return ((y2 - y1) * x + x2 * y1 - x1 * y2) / (x2 - x1)
interpolate(12,29,14,38,13)