Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to factorise an expression 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 :: absolute value of int python 
Python :: python custom array sort 
Python :: zermelo python 
Python :: python round number numpy 
Python :: making hexagon in python turtle 
Python :: python edit text file 
Python :: txt file duplicate line remover python 
Python :: python console command 
Python :: python json indented 
Python :: how to equal two arrays in python with out linking them 
Python :: matplotlib Savefig cuts off title 
Python :: python split a string by tab 
Python :: key item loop list python 
Python :: for loop with float python 
Python :: export a dataframe from rstudio as csv 
Python :: how to get chat first name in telebot 
Python :: python inheritance remove an attribute 
Python :: random variables python 
Python :: read excel sheet in python 
Python :: python import specific excel sheet 
Python :: extract n grams from text python 
Python :: positive lookahead regex python 
Python :: python command not found 
Python :: remover espaços string python 
Python :: How to log a python crash? 
Python :: date parser python pandas 
Python :: python zip file open as text 
Python :: django foreign key error Cannot assign must be a instance 
Python :: how to run function on different thread python 
Python :: The path python2 (from --python=python2) does not exist 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =