Program to Check and Print All Perfect Numbers in the Given Range

What is perfect number and how to check it using in C++, Java, Python? Write a program to find and print all perfect numbers in the given range.