You are viewing a single comment's thread. Return to all comments →
def jumpingOnClouds(c): # Write your code here count_jumps = 0 i=0 while i < len(c)-1: count_jumps+=1 i+= 2 if i+2<len(c) and not c[i+2] else 1 return count_jumps
Jumping on the Clouds
You are viewing a single comment's thread. Return to all comments →