Simple python query
<p>So my problem is that i have a down-loader that has the percent of the file downloaded so far.
And sometimes the percent doesent go up by one or some times it goes up by 4 or 5 etc.
so say my files percent of download went like this:</p>

<pre><code>0 % done
1 % done
2 % done
2 % done
2 % done
3 % done
3 % done
3 % done
3 % done
3 % done
4 % done
5 % done
6 % done
7 % done
7 % done
8 % done
9 % done
10 % done
10 % done
11 % done
12 % done
12 % done
12 % done
13 % done
14 % done
14 % done
15 % done
16 % done
17 % done
17 % done
17 % done
17 % done
17 % done
18 % done
19 % done
20 % done
20 % done
20 % done
20 % done
21 % done
22 % done
23 % done
24 % done
25 % done
26 % done
26 % done
27 % done
28 % done
28 % done
29 % done
30 % done
30 % done
31 % done
32 % done
33 % done
33 % done
33 % done
33 % done
33 % done
34 % done
35 % done
36 % done
36 % done
37 % done
37 % done
38 % done
38 % done
38 % done
39 % done
40 % done
40 % done
40 % done
41 % done
41 % done
41 % done
42 % done
42 % done
43 % done
43 % done
44 % done
44 % done
45 % done
45 % done
46 % done
46 % done
47 % done
47 % done
47 % done
47 % done
47 % done
48 % done
48 % done
49 % done
50 % done
50 % done
50 % done
51 % done
51 % done
51 % done
52 % done
52 % done
53 % done
54 % done
54 % done
54 % done
54 % done
54 % done
54 % done
54 % done
54 % done
55 % done
55 % done
55 % done
55 % done
56 % done
56 % done
56 % done
56 % done
56 % done
56 % done
57 % done
58 % done
59 % done
60 % done
60 % done
61 % done
61 % done
62 % done
62 % done
63 % done
64 % done
65 % done
65 % done
66 % done
66 % done
67 % done
67 % done
67 % done
68 % done
68 % done
69 % done
69 % done
70 % done
70 % done
71 % done
72 % done
73 % done
74 % done
74 % done
75 % done
76 % done
77 % done
78 % done
79 % done
79 % done
80 % done
80 % done
81 % done
81 % done
81 % done
82 % done
83 % done
84 % done
85 % done
85 % done
85 % done
85 % done
86 % done
87 % done
87 % done
87 % done
87 % done
87 % done
87 % done
88 % done
89 % done
89 % done
89 % done
90 % done
90 % done
90 % done
91 % done
91 % done
92 % done
93 % done
94 % done
94 % done
95 % done
95 % done
96 % done
97 % done
98 % done
99 % done
99 % done
99 % done
100 % done
</code></pre>

<p>i would want the number that the percent went up... so if it was:</p>

<pre><code>0 % done
1 % done
2 % done
2 % done
2 % done
3 % done
3 % done
3 % done
3 % done
3 % done
4 % done
5 % done
</code></pre>

<p>the result would be some thing like:</p>

<pre><code>1
1
0
0
0
1
0
0
0
0
1
1
1
</code></pre>

<p>i know this is very simple so far ive tried some thing like:</p>

<pre><code>import random

a=0
z=0
c=0
while a!=100:
    b=random.randint(1,2)
    z+=a
    if b==1:

        a+=1
    z-=a
    print a
    c+=a
    final=c-a
    print final
</code></pre>

<p>im almost positive that im making this more complicated then it has to be.</p>
