Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python expression factorisation

# 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 :: pandas select row by index 
Python :: python open dicom file 
Python :: zermelo api 
Python :: numpy round 
Python :: check cuda available tensorflow 
Python :: random choice dictionary python 
Python :: how to add column headers in pandas 
Python :: os run shell command python 
Python :: generate valid sudoku board python 
Python :: python valeur de pi 
Python :: matplotlib title not fully visible 
Python :: open applications by python 
Python :: waitkey in opencv 
Python :: save matplotlib figure 
Python :: change python 3.5 to 3.6 ubuntu 
Python :: write geopands into postgres python 
Python :: Python program to check leap year or not? 
Python :: list to set keep order python 
Python :: filter function using lambda in python 
Python :: jinja len is undefined 
Python :: python pickle example 
Python :: unzip python 
Python :: drop index in multiindex pandas 
Python :: numpy stdev 
Python :: oppsite of abs() python 
Python :: python program to multiplies all the items in a list using function 
Python :: convert 2d list to 1d python 
Python :: how to create a file in a specific location in python 
Python :: run code at the same time python 
Python :: how to make index column as a normal column 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =