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