Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to factorise expressions in python

# Python Program to find the factors of a number

# This function computes the factor of the argument passed
def print_factors(x):
   print("The factors of",x,"are:")
   for i in range(1, x + 1):
       if x % i == 0:
           print(i)

num = float(input())

print_factors(num)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #factorise #expressions #python
ADD COMMENT
Topic
Name
3+8 =