Skip to content

Instantly share code, notes, and snippets.

@ALXTorresC
Created January 17, 2018 03:52
Show Gist options
  • Save ALXTorresC/40a135b075d3cfee6f9159518beb0a60 to your computer and use it in GitHub Desktop.
Save ALXTorresC/40a135b075d3cfee6f9159518beb0a60 to your computer and use it in GitHub Desktop.
Ejercicio004
#-*- 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