<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Write an algorithm that takes a set of numbers and returns the sum of all numbers in the set.
my_set = {2, 3, 4, 5}<|im_end|>
<|im_start|>assistant
def sum_set(my_set):
    total = 0 # Initialize total
    for num in my_set: 
        total += num
    return total

my_set = {2, 3, 4, 5}
total = sum_set(my_set)
print(total)  # Output 14<|im_end|>
