Write a program in python to find and print all the factors of a number.

Example:

To find factors of any number in python we need to follow the following steps.

  1. Input a number (num)
  2. Loop from 1 to num and check if num is divisible by them or not.
  3. If yes then that number is the fator of num.

Recommended: Python For Loop

Output

If you are having trouble understanding the code then please comment below your doubts.

Leave a Reply