More than one argument 6.topic


#1

m = 5
n = 13

Add add_function here!

def add_function(x, y):
return x + y

print add_function(m, n)


#2

Hi what's the problem.


#3

change the x and y to m and n


#4

This code worked for me:

def add_function(x , y):
    return x + y

print add_function(m, n)

#5

I have the exact same code and it doesn't work for me.


#6

Hi can you post your code and the error you get?


#7

m = 5
n = 13

Add add_function here!

def add_funtion(x, y):
return x + y

print add_funtion(m, n)

Oops, try again. add_function(18, 13) resulted in an error: global name 'results' is not defined

I've tried changing the x and y to m and n. I've also tried just having (x + y) instead of (return x + y). Everything I try keeps coming back with errors.


#8

Hi this part

def add_funtion(x, y):
......
print add_funtion(m, n)

this part you wrote funtion instead of function


#9

I can't believe I've been looking at this for so long and didn't see that.

Thanks