Computer Science, asked by uleenasri955396855, 6 hours ago

write a program to print given number is perfect or not output in list format in python​

Answers

Answered by IIMissTwinkleStarII
2

Answer:

The program output is also shown below. n = int(input("Enter any number: ")) sum1 = 0 for i in range(1, n): if(n % i == 0): sum1 = sum1 + i if (sum1 == n): print("The number is a Perfect number! ") else: print("The number is not a Perfect number! ")

Answered by totakuraveerabhadrao
1

Answer:

plz mark me brainliest

Explanation:

The program output is also shown below. n = int(input("Enter any number: ")) sum1 = 0 for i in range(1, n): if(n % i == 0): sum1 = sum1 + i if (sum1 == n): print("The number is a Perfect number! ") else: print("The number is not a Perfect number! ")

Similar questions