if the second condition is true first then the first condition is ignored and is never checked again.
if the second 'if statement' is executed then the first one is not executed anymore even if it is true.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Carey Brown wrote:Your while should be outside of your ifs.
saeid jamali wrote:
So could you please explain why my logic didn't work. I mean my logic also makes sense and theoretically it should work
Don't get me started about those stupid light bulbs. |