Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: check if numpy array is 1d 
Python :: python open dicom 
Python :: find matches between two lists python 
Python :: how to get current time in milliseconds in python 
Python :: df change column names 
Python :: get number of bits on integer in python 
Python :: import crypto python 
Python :: python saveAsTextFile 
Python :: converting bool to 1 if it has true and if it is false print 1 
Python :: the four pillars of Op in Python 
Python :: python sum of digits in a string 
Python :: how to save the history of keras model 
Python :: python calculate prime numbers until numer 
Python :: django template iterate dict 
Python :: python negative infinity 
Python :: mimetype error django react 
Python :: how to convert 24 hours to 12 hours in python 
Python :: pandas remove rows with null in column 
Python :: all permutations python 
Python :: how to color print in python 
Python :: likeliness python 
Python :: python http server command line 
Python :: opencv get contours 
Python :: remove duplicates without changing order python 
Python :: pathlib recursive search 
Python :: pandas subtract integer from column 
Python :: connect to mysql database jupyter 
Python :: elon son name 
Python :: python intersection of two lists 
Python :: email authentication python 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =