Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. main_number = int(float(input("Enter a number to find out its divisors: ")))
  2. divisors = range(1, main_number + 1)
  3. divisors_list = []
  4.  
  5. for num in divisors:
  6. if main_number % num == 0:
  7. divisors_list.append(num)
  8.  
  9. print(divisors_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement