Could someone spot mistake?
Hi, I am somewhat struggling with functions. I wrote similar one without the test strings, and seem to be working on my IDE. It yet doesn't return anything when I submit the task. Obviously, it is due to I changed "return" to "print". If I substitute print for return on line 6, it does not work. How could that be improved? (I still do not fully undertsand the concept of return)
- def end_zeros(num):
- counter = 0
- while num % 10 == 0:
- counter += 1
- num = num // 10
- print(counter)
- end_zeros(3800)