I am trying to know how many elements are greater than the previous number. im trying to input 1,5,2,4,3,0 but when it comes to the 4 and 3, the "times" does not add up. Could you tell me what i missed on my code? thanks a lot.
a = int(input()) b = -1 times = 0 while b != 0: b = int(input()) if a > b: times =+1 a = b print(times)
User has been warned for this post. Reason: No BB code even after advised