Skip to content

Chase2Learn

  • Home
  • Blog
  • Free Courses
  • Select Domain
    • C Programs
    • C++ Programs
    • Python Programs
    • Java Programs
    • RDBMS Programs
  • Competitive Programming
    • HackerRank
      • HackerRank Algorithm
      • HackerRank C
      • HackerRank C++
      • HackerRank Java
      • HackerRank Python
      • 10 days of javascript
      • HackerRank SQL
      • HackerRank Linux Shell
      • HackerRank Ruby
      • HackerRank Regex
    • CodeChef Solutions
    • Leetcode Solutions
  • Quizzes
    • Coursera Quiz Answers
    • LinkedIn Assessments
    • Google Course Answer
    • NPTEL Solutions
    • Fiverr Skills Test
    • SEMrush Exam Answers
    • HubSpot Quiz Answers

Python program to check Perfect Number

October 15, 2021 by admin
def perfect_number(n):
    sum = 0
    for x in range(1, n):
        if n % x == 0:
            sum += x
    return sum == n
print(perfect_number(6))

OUTPUT:–

True

Categories Python Programming Solutions Tags programs in python, python programs solution
Python program to find Square of a Number
Python program to check Prime Number
Sharing Is Caring
Advertisement

Recent Posts

Your Trusted Car Accident Attorney Long Beach: Legal Support You Can Rely On

Google Cloud Database Engineer Specialization

Google Cloud Database Engineer Specialization

Google Data Analytics

Google Data Analytics

Google Advanced Data Analytics

Google Advanced Data Analytics

Google Business Intelligence

Google Business Intelligence

Google Project Management

Google Project Management

Chase2Learn

Get here Blogs, coding tips, and coding languages like python, Java, C, C++, and JavaScript to practice problems and solutions.

Categorys

Blog

Facebook

Instagram

YouTube

Site Links

About Us

Contact Us

Disclaimer

Privacy Policy

© 2023 Chase2Learn | All rights reserved

Privacy Policy | Disclaimer