Contact
Privacy
Coding Development Art
  • Home
  • Latest
  • Oldest
  • Popular
  • Random
  • Home»
  • Categrories»
  • Programming Languages»
  • Python»

Write a functio to check whether a number if perfect or not - Python

Categories:
Python
Viewed: 4 - Published at: a few seconds ago

[ Write a functio to check whether a number if perfect or not ]

def is_perfect(n):
    sum_ = 0
    for i in range(1, n//2 + 1):
        if n%i == 0:
            sum_+=i
    if sum_ == n:
        return True
    return False

Related Posts:

C program that compare two given dates
C program that compare two given dates
C Programs
Getting forbidden while downloading file in django view
Getting forbidden while downloading file in django view
Python
SSRS string in parameter to change query
SSRS string in parameter to change query
Python Circular Imports
Python Circular Imports
Python
Reading and Writing CSVs in Java
Reading and Writing CSVs in Java
Java
Unrolled Linked List Data Structure
Unrolled Linked List Data Structure
Data Structure

You may also like:

Batch File Comments
Batch File Comments
Batch File Programming
Fatherhood: Joseph, Jesus’ Father
Fatherhood: Joseph, Jesus’ Father
News
Unable to install Scipy using pip
Unable to install Scipy using pip
Python
how to transfer website from testsite to root folder Joomla2.5 & virtuemart 2.06
how to transfer website from testsite to root folder Joomla2.5 & virtuemart 2.06
Taraxa Consensus (1/5): Single chain’s tough trade-offs
Taraxa Consensus (1/5): Single chain’s tough trade-offs
News
Mark Rober’s exclusive NordVPN discount coupon code
Mark Rober’s exclusive NordVPN discount coupon code
News
Categories
  • Blog
    • Career
    • Computer
    • Downloads
    • Internet
    • Linux
    • News
    • Review
    • Security
    • Technology
  • Database
    • MySql
    • Oracle Database
    • SQL Server
    • SQLite
    • mongodb
  • Dev
    • Algorithm
    • Android
    • Batch File Programming
    • Books
    • Competitive Programming
    • Computer Networks
    • Data Structure
    • Design
    • Development
    • Flutter
    • Game
    • Git
    • Interview Questions
    • JDBC
    • Machine Learning
    • Mobile
    • Operating System
    • Programming
    • Projects
    • Sponsored
    • Webservice
    • iOS
  • Framework
    • .NET
    • Angular
    • Django
    • MVC
    • Nodejs
    • React
  • Programming Languages
    • ASP.NET
    • C Programs
    • C#
    • C++ Programs
    • CSS
    • HTML
    • JSP
    • Java
    • JavaScript
    • PHP
    • PL/SQL
    • Python
    • SQL
    • Swift
    • VB.NET
  • Tools
    • privacy-policy-generator
    • Mac Vendors
    • Ports Numbers
    • Wifi Routers Passwords

Site all the data, are collected from Internet, belongs to original author, please do not used for commercial purposes !

Coding Development Art
  https://www.codevelop.art
 
  contact@codevelop.art

Posts

  • Home
  • Latest
  • Oldest
  • Popular
  • Random

Follow Us

© 2018 codevelop.art - Coding Develop Art - programming and development tutorials blog - Learn all Program languages | codevelop.art.
All Rights Reserved.
  • Contact
  • Privacy
  • Terms of service
  • Copyright
  • Disclaimer