Skip to content

Commit 7da17d6

Browse files
authored
Gen No
Find the factor of number
1 parent 99cf7d7 commit 7da17d6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

genno

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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)

0 commit comments

Comments
 (0)