Guest User

Untitled

a guest
Jan 15th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #Create a program that asks the user for a number and then prints out a list of all the divisors of that number.
  2. number= int(input("Escribe un numero:"))
  3. lista=[]
  4. for x in range(2, number + 1):
  5. if number % x == 0:
  6. lista.append(x)
  7. print("Los números divisibles por tu número son:" + " " + str(lista))
Add Comment
Please, Sign In to add comment