You need to return the value of c from the function.
def equals_to(x,y):
c = x + y # c = x + y not a + b = c
return c # return the value of c
def some_function(something):
for i in something:
...
return
sum = equals_to(1,2) # set sum to the return value from the function
some_function(sum) # pass sum to some_function
Also the function signature of equals_to takes the arguments x,y but in the function you use a,b and your assignment was the wrong way round, c takes the value of x + y not a + b equals c.
Strongly recommend: http://docs.python.org/2/tutorial/
c,aandb? Where are they from?equals_todoesn't compile, it looks like it's meant to return an integer, which wouldn't work in afor x in blahstatement.def equals_to(a,b)I made a mistake while typing out the example. Alsoa + b = cshould have beenc = a + b