Created
November 3, 2017 20:12
-
-
Save bakialmaci/657b1efca26c5a361e5d3c2a87df1058 to your computer and use it in GitHub Desktop.
Finding Lucky Number with PYTHON 3
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
sayilar = input('Enter numbers: ').split(",") | |
for sayi in sayilar: | |
print("",end='') | |
sayi = int(sayi) | |
list=range(-1,sayi,2) | |
i=2 | |
while list[i:]:list=sorted(set(list)-set(list[list[i]::list[i]]));i+=1 | |
print("The Lucky Numbers:",list[1:sayi+1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment