Created
October 8, 2016 03:19
-
-
Save rnaeye/e1072ac53a75c7fe75a5be3f3cb7bd1b to your computer and use it in GitHub Desktop.
lesson 4
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
input_number = input("Enter a number: ") | |
print ("You entered " + str(input_number)) | |
number = abs(input_number) | |
x = range (1, number) | |
divisors =[] | |
for element in x: | |
if number % element == 0: | |
divisors.append(element) | |
print (divisors) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment