Great site, and I really appreciate all the answers and tips I get from here. I'm trying to calculate the sum of a series INCREMENTALLY of fractions, but cant seem to get the loop-in-a-function right. I have been able to write the program to calculate the total sum, and to calculate the individual fractions in the series, but I need it to display the running sum at each step in the string. the series is 1/2, 2/3, 3/4, 4/5, ...., 20/21. so that it displays:
0.5000
1.1667
...
16.4023
17.3546

This is what I have so far:

```
def frac(n, d):
    a = n / d
    return a

def main():
    count = 1
    while count <= 20:
        num = count
        den = count +1
        ans = frac(num, den)
        print(num, "    ", format(ans, ".4f"))
        count += 1
main()

```

But it only gives me this:

```
1      0.5000
2      0.6667
3      0.7500
4      0.8000
5      0.8333
6      0.8571
7      0.8750
8      0.8889
9      0.9000
10     0.9091
11     0.9167
12     0.9231
13     0.9286
14     0.9333
15     0.9375
16     0.9412
17     0.9444
18     0.9474
19     0.9500
20     0.9524

```