Created
January 17, 2018 03:52
-
-
Save ALXTorresC/40a135b075d3cfee6f9159518beb0a60 to your computer and use it in GitHub Desktop.
Ejercicio004
This file contains hidden or 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
#-*- coding: utf-8 -*- | |
def divisors(x): | |
lista=range(1,x+1) | |
listb=[] | |
for i in lista: | |
if x % i == 0: | |
listb.append(i) | |
return listb | |
if __name__ == '__main__': | |
x = int(input("Ingrese el número a dividir: ")) | |
print(divisors(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment