Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def factors(x,i):
- if i==0:
- return
- if x%i == 0:
- print(i)
- return factors (x,i-1)
- value = int(input('Please enter an integer which is grater than 0: '))
- if value == 0:
- print('You entred a 0.')
- elif value < 0:
- print('That value is less than 0.')
- else:
- factors(value,value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement