def printDivisors(n): i = 1 while i <= n: if (n % i == 0): print(i,' ') i = i + 1 # Driver method x=int(input('Please enter your number :')) print('The divisors of'+ str(x) + ' are: ') printDivisors(x)