mirror of
https://bitbucket.org/Mattrixwv/pyclasses.git
synced 2025-12-06 18:33:58 -05:00
Fixed bug where getFactos prints error message when goalNumber is prime
This commit is contained in:
@@ -56,6 +56,7 @@ def getFactors(goalNumber: int):
|
||||
#If you didn't get any factors the number itself must be a prime
|
||||
if(len(factors) == 0):
|
||||
factors.append(goalNumber)
|
||||
goalNumber /= goalNumber
|
||||
|
||||
#If for some reason the goalNumber is not 0 print an error message
|
||||
if(goalNumber > 1):
|
||||
|
||||
Reference in New Issue
Block a user