Skip to content

Instantly share code, notes, and snippets.

@piotrgredowski
Created August 16, 2016 09:47
Show Gist options
  • Save piotrgredowski/142e62faba80c881546613ebcdb184d3 to your computer and use it in GitHub Desktop.
Save piotrgredowski/142e62faba80c881546613ebcdb184d3 to your computer and use it in GitHub Desktop.
# 04 Divisors
num = int(input("\tI'll list you numbers which are divisors of your number.\n\tType your number:"))
all_to = range(2, num)
print ("\n\tThese numbers are divisors of " + str(num) + ":")
for x in all_to:
if num % x == 0:
print ("\t" + str(x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment