There is a better way to write this code:
for i in range(50, 56, 1): print(i / 10) print("Half way done!") for k in range(56, 61, 1): print(k / 10) print("All the way done!") Output:
5.0 5.1 5.2 5.3 5.4 5.5 Half way done! 5.6 5.7 5.8 5.9 6.0 All the way done! I've been trying to compare floating point numbers and this is the best I have gotten so far, there are methods out there but I cant understand them as I'm not at that level yet, so if anyone could provide an alternative way of comparing floating point numbers, that would be much appreciated. Thanks!