Skip to content

Commit

Permalink
Number of trailing zeros of N
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Dec 10, 2024
1 parent 8123d6b commit 8d6ddd3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions kyu_5/number_of_trailing_zeros_of_n/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Number of trailing zeros of N."""
9 changes: 5 additions & 4 deletions kyu_5/number_of_trailing_zeros_of_n/test_zeros.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
Test for -> Number of trailing zeros of N!
Test for -> Number of trailing zeros of N!.
Created by Egor Kostan.
GitHub: https://github.com/ikostan
"""
Expand Down Expand Up @@ -27,12 +28,12 @@
name='Source/Kata')
# pylint: enable-msg=R0801
class ZerosTestCase(unittest.TestCase):
"""
Testing zeros function
"""
"""Testing zeros function."""

def test_zeros(self):
"""
Testing zeros function with various test data.
Testing 'zeros' program that should calculate the number
of trailing zeros in a factorial of a given number.
:return: None
Expand Down
9 changes: 6 additions & 3 deletions kyu_5/number_of_trailing_zeros_of_n/zeros.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
"""
Solution for -> Number of trailing zeros of N!
Solution for -> Number of trailing zeros of N!.
Created by Egor Kostan.
GitHub: https://github.com/ikostan
"""


def zeros(n) -> int:
"""
A program that will calculate the number of
trailing zeros in a factorial of a given number.
zeros function.
A program that calculate the number of trailing
zeros in a factorial of a given number.
N! = 1 * 2 * 3 * ... * N
Expand Down

0 comments on commit 8d6ddd3

Please sign in to comment.