+ 1
Why this code is giving "No Output " message when I run it in code playground?
def count_char(text, char): n= 0 for c in text: if c == char: n += 1 else: n=0 return n count_char("aha","a")
6 ответов
+ 8
there's no print statement
+ 2
ya the function has returned value.. but how will you see it.? it won't be displayed.. so you need to have the print statement..
write... print(count_char("aha","a"));
0
i am really crazy. thanks anyways
0
no print statement ,😂😂😂😂😂😂
0
but return to krna chahiye na??
0
oh yes
i'm also crazy
thank you