Created
December 11, 2017 21:57
-
-
Save ysnerdem/6aa5b71d51b317c5cb50544dcbb97404 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mukemmel_sayi(sayi): | |
lst = [i for i in range(1, sayi) if sayi % i == 0] | |
sum = 0 | |
for i in lst: | |
sum += i | |
if sum == sayi: | |
print(sayi) | |
for i in range(1, 1001): | |
mukemmel_sayi(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment