Set creation and operations
📖 Scenario: You are organizing a small community event. You have lists of people who signed up for different activities. You want to use sets to manage these lists and find who is attending which activities.
🎯 Goal: Build a Swift program that creates sets of attendees for two activities, finds who is attending both activities, and who is attending only one.
📋 What You'll Learn
Create two sets with exact names and values
Create a variable for the union of the two sets
Create a variable for the intersection of the two sets
Print the union and intersection sets exactly
💡 Why This Matters
🌍 Real World
Managing event attendees and their participation in different activities helps organizers avoid duplicates and understand overlaps.
💼 Career
Set operations are useful in data processing, filtering unique items, and comparing groups in software development.
Progress0 / 4 steps