Series Fun


Around the middle of March 2012 when we were covering series in Calculus class I got the idea to make a short Python program to approximate sine. I got a bit carried away and came up with this: from tkinter import * from math import * def getSinSeriesApprox(x, n): return sum([(((-1)**(i+1))*(x**(i*2-1)))/factorial(i*2-1) for i in range(1, […]

Posted in: Code by nsundin
Copyright © 2011-2024 Programmatic Verse · RSS Feed
Built on Skeleton
Powerered by Wordpress