#!/usr/bin/env python
import math
def findOver100p1():
t = 0
for i in range(0,101):
t=t+(1/(2 + (.03*i)))
return t * .03
def findUnder100p1():
t = 0
for i in range(1,101):
t=t+(1/(2 + (.03*i)))
return t * .03
def findOver1000p1():
t = 0
for i in range(0,1001):
t=t+(1/(2 + (.003*i)))
return t * .003
def findUnder1000p1():
t = 0
for i in range(1,1001):
t=t+(1/(2 + (.003*i)))
return t * .003
def computeAverage100p1():
t, avg = 0, 0
t = findOver100p1() + findUnder100p1()
avg = t / 2.00
return avg
def computeAverage1000p1():
t, avg = 0, 0
t = findOver1000p1() + findUnder1000p1()
avg = t / 2.00
return avg
def main():
print "At 100 iteration, we have the following: "
print computeAverage100p1()
print "At 1000 iteration, we have the following: "
print computeAverage1000p1()
# added proper main function
if __name__ == "__main__":
main()