import%20marimo%0A%0A__generated_with%20%3D%20%220.16.1%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22)%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20pandas%20as%20pd%0A%20%20%20%20import%20matplotlib.pyplot%20as%20plt%0A%20%20%20%20from%20matplotlib.ticker%20import%20MaxNLocator%0A%20%20%20%20return%20MaxNLocator%2C%20pd%2C%20plt%0A%0A%0A%40app.function%0Adef%20fib_list(n%3A%20int)%20-%3E%20list%5Bint%5D%3A%0A%20%20%20%20fibs%20%3D%20%5B0%2C%201%5D%0A%20%20%20%20for%20_%20in%20range(2%2C%20n)%3A%0A%20%20%20%20%20%20%20%20fibs.append(fibs%5B-1%5D%20%2B%20fibs%5B-2%5D)%0A%20%20%20%20return%20fibs%0A%0A%0A%40app.cell%0Adef%20_(MaxNLocator%2C%20pd%2C%20plt)%3A%0A%20%20%20%20def%20plot_fib(n%3A%20int)%20-%3E%20None%3A%0A%20%20%20%20%20%20%20%20fibs%20%3D%20fib_list(n)%0A%20%20%20%20%20%20%20%20df%20%3D%20pd.DataFrame(%7B%22n%22%3A%20list(range(1%2C%20n%2B1))%2C%20%22fib%22%3A%20fibs%7D)%0A%0A%20%20%20%20%20%20%20%20%23%20Plot%20inline%0A%20%20%20%20%20%20%20%20plt.figure(figsize%3D(10%2C%204))%0A%20%20%20%20%20%20%20%20plt.xlabel(%22n%20(index)%22)%0A%20%20%20%20%20%20%20%20plt.ylabel(%22Fib(n)%22)%0A%20%20%20%20%20%20%20%20plt.plot(df%5B%22n%22%5D%2C%20df%5B%22fib%22%5D%2C%20marker%3D%22o%22)%0A%20%20%20%20%20%20%20%20plt.xlabel(%22n%20(index)%22)%0A%20%20%20%20%20%20%20%20plt.ylabel(%22Fib(n)%22)%0A%20%20%20%20%20%20%20%20plt.title(f%22First%20%7Bn%7D%20Fibonacci%20numbers%22)%0A%20%20%20%20%20%20%20%20plt.grid(True)%0A%20%20%20%20%20%20%20%20ax%20%3D%20plt.gca()%0A%20%20%20%20%20%20%20%20ax.xaxis.set_major_locator(MaxNLocator(integer%3DTrue))%0A%20%20%20%20%20%20%20%20ax.yaxis.set_major_locator(MaxNLocator(integer%3DTrue))%0A%20%20%20%20%20%20%20%20plt.tight_layout()%0A%20%20%20%20%20%20%20%20plt.show()%0A%20%20%20%20return%20(plot_fib%2C)%0A%0A%0A%40app.cell%0Adef%20_(nb%2C%20plot_fib)%3A%0A%20%20%20%20n%20%3D%2020%0A%20%20%20%20plot_fib(nb)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
400782df4e426fe57dfb8832640f8983aac934b30f39086523e5b73f4555b41f