Skip to content

Update Prime-Factors.md #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
deb12378 authored Dec 22, 2020
commit e0664e967e1e4aa2601e4349fb9703fe17d729eb
4 changes: 2 additions & 2 deletions Prime-number/Prime-Factors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`
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`