heights = [100, 120, 150, 180, 160, 170, 190, 210]

answer = 0
count = 0 

for i in range(len(heights) - 1):
    if heights[i] < heights[i + 1]:
        count += 1
    else:
        if count >= 3:
            answer += 1
        count = 0

print(answer)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: