factors.py
7 linespython
DOWNLOAD
1# Aim: Program to perform factor calculation (Factor Calculation).
2num = int(input("Enter a number: "))
3print("Factors of", num, "are:")
4for i in range(1, num + 1):
5    if num % i == 0:
6        print(i)
7