Created
July 18, 2018 03:24
-
-
Save BlogBlocks/ae7b9856ebbbdddb2d2b7da9aa666022 to your computer and use it in GitHub Desktop.
get and list factors for a number my numpy reshape tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
base = int(input('Find Factors of: ')) | |
FACTORS = [] | |
for i in range(1,base+1): | |
if base %i == 0: | |
FACTORS.append(i) | |
print 'Possible Factors: {} = {}'.format(base, FACTORS) | |
for factor in FACTORS: | |
print factor,'x',base/factor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment