Posts by Vpguedes • 1 point
1 post
-
0
votes10
answers1739
viewsA: How to count the zeroes to the right of a number?
Version in Python 3 def end_zeros(num: int) -> int: count = 0 while num % 10 == 0: count += 1 num /= 10 if num == 0: count = 1 return count return count…