Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main_number = int(float(input("Enter a number to find out its divisors: ")))
- divisors = range(1, main_number + 1)
- divisors_list = []
- for num in divisors:
- if main_number % num == 0:
- divisors_list.append(num)
- print(divisors_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement