Question: linux1[150] $ python3 perfection.py Enter the number to check for perfection: 33550336 The number is perfect! 1 + 2 + 4 + 8 + 16
![linux1[150] $ python3 perfection.py Enter the number to check for perfection:](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5b60913eaf_95266f5b608a408a.jpg)
linux1[150] $ python3 perfection.py Enter the number to check for perfection: 33550336 The number is perfect! 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512 + 1024 + 2048 + 4096 + 8191 + 16382 + 32764 + 65528 + 131056 + 262112 + 524224 + 1048448 + 2096896 + 4193792 + 8387584 + 16775168 = 33550336 linux1[151] % python3 perfection.py Enter the number to check for perfection: 123 The number isn't perfect! 1 + 3 + 41 = 45 linux1[152] % python3 perfection.py Enter the number to check for perfection: 28 The number is perfect! 1 + 2 + 4 + 7 + 14 = 28 linux1[153] $ python3 perfection.py Enter the number to check for perfection: 8127 The number isn't perfect! 1 + 3 + 7 + 9 + 21 + 27 + 43 + 63 + 129 + 189 + 301 + 387 + 903 + 1161 + 2709 = 5953
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
