Hint: A perfect number is a positive integer that is equal to the sum of its proper divisors,excluding itself. For example, 6 is a perfect number because its divisors are 1, 2, and 3,and 1+2+3=6.
The content of data 1.txt file:12,3,5,28,-1,6,496,23,8128,34,55,8,20,22,2,10,11,8128,7,28
Result of the program:
Perfect numbers from the file: [28, 6, 496, 8128, 8128, 28]
Occurrences of each perfect number: {496: 1, 28:2, 6: 1, 8128: 2}
Number(s) with the highest frequency: 28, 8128
Exercise 3: (4 marks) Write a program that performs the following tasks:
+ 100%
Zoom
Close