Skip to content

Instantly share code, notes, and snippets.

@SudhenduP
Created September 18, 2016 07:10
Show Gist options
  • Save SudhenduP/6cdd5fdd22fb1288b8ec6571444a8f5d to your computer and use it in GitHub Desktop.
Save SudhenduP/6cdd5fdd22fb1288b8ec6571444a8f5d to your computer and use it in GitHub Desktop.
Create a program that asks the user for a number and then prints out a list of all the divisors of that number
num1 = input('Enter a number for which you want to check the divisor')
dataset = range(1, num1)
print dataset
for data in dataset:
if num1%data == 0:
print data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment