• Sign in
  • Sign up 
  • Welcome
  • FAQ
  • Block Explorer 
  • Night Mode
  • Stolen Accounts Recovery 
  • Change Account Password 
  • Vote for Witnesses 
  • Hive Proposals 
  • OpenHive Chat 
  • Developer Portal 
  • Hive Whitepaper 
  • Privacy Policy
  • Terms of Service
logo
  • Posts
  • Proposals
  • Witnesses
  • Our dApps
LoginSign up

Python Program to Find the Factors of a Number

python-dev (58)in #python-dev • 6 years ago
# 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 = 320

print_factors(num)
6 years ago in #python-dev by python-dev (58)
$0.45
  • Past Payouts $0.45
  • - Author $0.23
  • - Curators $0.23
2 votes
  • crypto.income: $0.37
  • xiguang: $0.08
Reply 0
Sort:  
  • Trending
    • Trending
    • Votes
    • Age