Skip to content

Instantly share code, notes, and snippets.

@aijony
Last active June 2, 2018 05:10
Show Gist options
  • Save aijony/eefbb8d1d3c183e0f6530e4dbe3f47d5 to your computer and use it in GitHub Desktop.
Save aijony/eefbb8d1d3c183e0f6530e4dbe3f47d5 to your computer and use it in GitHub Desktop.
Integrate template, replace the 0's
def __init__(self, xMin, xMax, N):
# Define class variables
self.xMin = xMin
0
0
self.deltax = 0
# Define class function
def x(i):
return 0
def integrate(self):
# Don't replace this zero
result = 0
# Iterate through
for i in range(0):
result = result + x(i)
self.result = result
def show(self):
return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment