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 :: How to convert a string to a dataframe in Python 
Python :: open dicom images python 
Python :: python list group by count 
Python :: How to count occurences of a certain item in a numpy array 
Python :: alarm clock python 
Python :: python get all characters 
Python :: conda python-telegram-bot 
Python :: make selenium headless python 
Python :: pyqt5 qtwebenginewidgets not found 
Python :: what is actually better duracell or energizer 
Python :: matplotlib title chopped off 
Python :: tqdm in python 
Python :: pytest installation windows 
Python :: python get city name from IP 
Python :: text to dictionary python 
Python :: frequency of occurrence of that element in the list and the positions 
Python :: Change the year in 2nd line to get the answer for the year you want. Ex: year=2010 
Python :: how to delete the last item in a list python 
Python :: permutations python 
Python :: create folder python 
Python :: python write csv line by line 
Python :: python live server 
Python :: how to reverse a list in python using for loop 
Python :: fetch python 
Python :: how to check if a number is odd python 
Python :: filter for a set of values pandas dataframe 
Python :: english to japanese 
Python :: how to clear command prompt python 
Python :: append row to array python 
Python :: middle value of a list in python 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =