Complete the code to skip printing the number 3 in the loop.
for i in range(1, 6): if i == [1]: continue print(i)
The continue statement skips the rest of the loop when i equals 3, so 3 is not printed.
Complete the code to skip all even numbers in the loop.
for num in range(1, 7): if num % 2 == [1]: continue print(num)
The expression num % 2 == 0 checks if a number is even. The continue skips even numbers.
Fix the error in the code to correctly skip printing the word 'skip'.
words = ['go', 'skip', 'stop'] for word in words: if word == [1]: continue print(word)
Strings must be enclosed in quotes. Using double quotes "skip" or single quotes is correct. Option B uses double quotes correctly.
Fill both blanks to skip numbers less than 4 and print the rest.
for n in range(1, 7): if n [1] 4: continue print(n)
The condition n < 4 skips numbers less than 4 using continue.
Fill all three blanks to skip words starting with 'a' and print others in uppercase.
words = ['apple', 'banana', 'avocado', 'cherry'] for w in words: if w[1]('a'): continue print(w[2]())
The method startswith('a') checks if a word starts with 'a'. The upper() method converts the word to uppercase before printing.