Posts by Yonack • 3 points
1 post
-
0
votes1
answer311
viewsQ: Recursion - I want to count how many times digits 3 and 4 appear
I want to count how many times the numbers 3 and 4 appear. What is going wrong? def count(x): y=0 if x[0]=='': print(y) return if x[0]=='3': y=y+1 return count(x[1:]) count('23334')…
python-3.xasked Yonack 3