Skip to content

Instantly share code, notes, and snippets.

@rnaeye
Created October 8, 2016 03:19
Show Gist options
  • Save rnaeye/e1072ac53a75c7fe75a5be3f3cb7bd1b to your computer and use it in GitHub Desktop.
Save rnaeye/e1072ac53a75c7fe75a5be3f3cb7bd1b to your computer and use it in GitHub Desktop.
lesson 4
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