Python: range doesn't increase
<p>I have to write a program that shows a column of kilograms and a column of pounds, starting at 1 kilogram and ending 99, increasing every step with 2.</p>

<p>I have the following code, and the range() works for the pounds part, but not for the kilograms part. It stays always 1 for the kilograms.</p>

<pre><code>for k in range(1,3,1):
    print("Kilograms","Pounds",sep="        ")
    for i in range(1,101,2):
       for j in range(2,223,3):
           print(i,"",j,sep="        ")
       break
    break
</code></pre>

<p>Also, why can't I use floats in the range, because officially it is 2.2 pounds.</p>

<p>Thanks in advance!</p>

<p>Try this</p>

<pre><code>import numpy as np


KG_TO_LBS = 2.20462
KG = np.arange(0,100,2.20462)

print("Kilograms", "Pounds")
for kg in KG:
    print(kg, kg/KG_TO_LBS)
</code></pre>

<p>you may have to change the printout to the format you like.</p>

python for-loop