+ 4

problem with fonction

Hi, I want to code something but I have a problem with a fonction. For example: def add_1(y,n): if y==("hello"): n+=1 a="hello" e=0 add_1(a,e) print(e) Why at the end e=0 and not e=1 Thank you

21st Jan 2018, 5:25 PM
Weathmious
Weathmious - avatar
3 Respostas
21st Jan 2018, 5:48 PM
Somasundaram R
Somasundaram R - avatar
+ 3
you printed variable e instead of function
21st Jan 2018, 5:49 PM
Somasundaram R
Somasundaram R - avatar
+ 3
thanks you!
21st Jan 2018, 6:17 PM
Weathmious
Weathmious - avatar