Exercise: Skip iteration with continue
Use a
continue
statement to skip negative numbers in the loop.numbers = (3,6,-2,6,-4,-9,5,2)
total_sum = 0
for num in numbers:
# add code here...
total_sum += num
print(total_sum)
# expected output: 22
Python
Setting up Python environment...
Output