This happens because your functions reaches the break on line 40:
t > t_open
1.0999999999999999 > 1
If it is of help, I investigated this with debugger built into PyCharm IDE, very handy!
Otherwise you can simply place some print statements to see values of meaningful variables as the program executes. That way it is way easier to find where the problem is, rather than guessing :)
if t > t_open: breakAt that point:
t > t_open
1.0999999999999999 > 1
If it is of help, I investigated this with debugger built into PyCharm IDE, very handy!
Otherwise you can simply place some print statements to see values of meaningful variables as the program executes. That way it is way easier to find where the problem is, rather than guessing :)