+ 1
def add_numbers(x, y): total = x + y return total print("This won't be printed") def gsc(): z=(add_numbers(4, 5)
why is this code not working??
2 Réponses
+ 2
thank you very much...
0
you have a function called gsc() that does nothing except call another function, but you aren't calling gsc() so it doesn't call the add function.. cut that part all together and simplify
simply do this instead..
def add_numbers(x,y):
return x+y
print(add_numbers(4,5))
or if you would prefer..
z=add_numbers(4,5)