You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
since while isnt gonna loop because of the code inside it, using if is better as it gets rid of the break statements too and does the same work but with lesser code
def summer_69(arr):
total = 0
add = True
for num in arr:
if add:
if num != 6:
total += num
else:
add = False
if not add:
if num == 9:
add = True
return total
The text was updated successfully, but these errors were encountered:
im referring to the 'function practice solutions'
since while isnt gonna loop because of the code inside it, using if is better as it gets rid of the break statements too and does the same work but with lesser code
The text was updated successfully, but these errors were encountered: