Methods, Blocks, & Sorting 7/19


(First Post :smiley:!)

(I'm a twelve year old learning to code by the way)

I don't know what is wrong with my code! It comes up with the error, "Make sure your add method expects two arguments." How do I fix this?

def add
    return n + 1



1- You need to write two numbers as arguments to the add method, to be like this: :slight_smile:

def add(x, y)


2- To return the sum of those numbers, inside the method, you must write:

def add(x, y)
    return x + y


Thank you! It worked! :smile:


silvergamesmc I'm also 12 years old but I've been doing code for around 3 years