From e0664e967e1e4aa2601e4349fb9703fe17d729eb Mon Sep 17 00:00:00 2001 From: deb12378 <70269983+deb12378@users.noreply.github.com> Date: Wed, 23 Dec 2020 00:59:54 +0530 Subject: [PATCH] Update Prime-Factors.md Floor Division operator must be used so that only integer values are returned and appended to the list of prime factors. --- Prime-number/Prime-Factors.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Prime-number/Prime-Factors.md b/Prime-number/Prime-Factors.md index b38e278..d33f8e0 100644 --- a/Prime-number/Prime-Factors.md +++ b/Prime-number/Prime-Factors.md @@ -28,7 +28,7 @@ def get_prime_factors(n): while n > 2: if(n % divisor == 0): factors.append(divisor) - n = n / divisor + n = n // divisor else: divisor = divisor + 1 return factors @@ -46,4 +46,4 @@ Prime factor is a prime number that divides the provided number. [![Next Page](../assets/next-button.png)](Smallest-prime-factor.md)   -tags: `programming-hero` `python` `python3` `problem-solving` `programming` `coding-challenge` `interview` `learn-python` `python-tutorial` `programming-exercises` `programming-challenges` `programming-fundamentals` `programming-contest` `python-coding-challenges` `python-problem-solving` \ No newline at end of file +tags: `programming-hero` `python` `python3` `problem-solving` `programming` `coding-challenge` `interview` `learn-python` `python-tutorial` `programming-exercises` `programming-challenges` `programming-fundamentals` `programming-contest` `python-coding-challenges` `python-problem-solving`