Skip to content

Commit 0e25250

Browse files
authored
Create Factor of a given number in python
1 parent 06d9456 commit 0e25250

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Factor of a given number in python

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def print_factors(x):
2+
print("The factors of",x,"are:")
3+
for i in range(1, x + 1):
4+
if x % i == 0:
5+
print(i)
6+
7+
num = 320
8+
9+
print_factors(num)

0 commit comments

Comments
 (0)