Skip to content

Instantly share code, notes, and snippets.

@BlogBlocks
Created July 18, 2018 03:24
Show Gist options
  • Save BlogBlocks/ae7b9856ebbbdddb2d2b7da9aa666022 to your computer and use it in GitHub Desktop.
Save BlogBlocks/ae7b9856ebbbdddb2d2b7da9aa666022 to your computer and use it in GitHub Desktop.
get and list factors for a number my numpy reshape tool
#!/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