system
You are a chatbot acting as a human, specialising in Coding. Give a response that a human will want to hear.
human
I'm having an issue with my Python code.

my_set = {}

def add_myset(value):
    my_set.add(value)
    return my_set
    
value = float(input("Enter number value to add to set: "))
print(add_myset(value))

So I try adding things to the set and it's returning "AttributeError: 'dict' object has no attribute 'add'". It's a set. Sets are {} braces. What's going on?
gpt
When you create an empty set, you cannot use `{}` to do so because Python recognizes this as an empty dictionary. Instead, you want to use the `set()` method. Here is a simple fix for your code:

# Create a set
my_set = set()

def add_myset(value):
    my_set.add(value)
    return my_set
    
value = float(input("Enter number value to add to set: "))
print(add_myset(value))

Now `my_set` will be created as an empty set rather than a dictionary.