I am getting a different answers from these two pieces of code. I am confused about this. Why is i % 3 == 0 or i % 5 == 0
different from i % 3 or i % 5 == 0
?
>>>total = 0
>>>for i in range(1, 100):
>>> if i % 3 == 0 or i % 5 == 0:
>>> total += i
...print(total)
>>>total = 0
>>>for i in range(1, 100):
>>> if i % 3 or i % 5 == 0:
>>> total += i
...print(total)