I'm trying to solve this problem and when I run the code, at some point it stops working correctly . I think it's because of rounding, but when that part is removed, the code executes to infinity.
i = 0
j = 1
while(i != 2.2):
print('I=%s J=%s' % (i, j))
j = j + 1
if(j == (i + 4)):
i = round(i + 0.2, 1)
j = round(j - 2.8, 1)
Is there a function that works best with decimals?