shubham3git
12/6/2018 - 10:45 AM

Divisors

Divisors

#Create a program that asks the user for a number 
#and then prints out a list of all the divisors of that number.
num=input("Enter a number\n")
a=[]
for i in range(1,100):
    if int(num)%i == 0:
        a.append(i)

print(a)