Python Forum
Inflow watertank before outward flow starts
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inflow watertank before outward flow starts
#5
This happens because your functions reaches the break on line 40:
if t > t_open:
    break
At 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 :)
Reply


Messages In This Thread
RE: Inflow watertank before outward flow starts - by j.crater - May-02-2018, 08:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Checking if string starts the same but end differently using re module ranbarr 1 1,780 May-20-2021, 06:23 PM
Last Post: Gribouillis
  nested while loop flow help Ponamis 4 3,133 Nov-02-2018, 11:22 PM
Last Post: Ponamis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020