# 028: Loop Control # Break and continue # Break - exit loop early numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for num in numbers: if num > 5: break # Stop here show num # Outputs: 1, 2, 3, 4, 5 # Continue - skip to next iteration for num in numbers: if num % 2 == 0: continue # Skip even numbers show num # Outputs: 1, 3, 5, 7, 9 # Find first match users = ["Alice", "Bob", "Charlie", "David"] found = null for user in users: if user[0] == "C": found = user break show "Found: {found}" # Charlie