Created
September 18, 2016 07:10
-
-
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
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
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