└── factor of a number /factor of a number: -------------------------------------------------------------------------------- 1 | # Python Program to find the factors of a number 2 | 3 | # This function computes the factor of the argument passed 4 | def print_factors(x): 5 | print("The factors of",x,"are:") 6 | for i in range(1, x + 1): 7 | if x % i == 0: 8 | print(i) 9 | 10 | num = 320 11 | 12 | print_factors(num) 13 | --------------------------------------------------------------------------------