Posts by The phantom • 11 points
1 post
-
1
votes1
answer53
viewsA: How to create a trigger to detect that a variable has changed value within a loop?
a = 0 a_anterior = 0 for i in range(20): if i == 5 or i == 9: a += 1 if a != a_anterior: print('a trocou de valor em i =', i) a_anterior = a '''by testing the code with more test cases it has worked…
pythonanswered The phantom 11