Last active
August 29, 2015 13:59
-
-
Save kocogluali/10560832 to your computer and use it in GitHub Desktop.
Python Mükemmel Sayı
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
#-*-coding:utf-8-*- | |
girilenSayi=input('Sayi Giriniz') | |
sonuc=0 | |
girilenSayi=int(girilenSayi) | |
l=[] | |
for i in range(1,girilenSayi): | |
if girilenSayi%i==0: | |
l.append(i) | |
for m in l: | |
sonuc=sonuc+m | |
if sonuc==girilenSayi: | |
print ('Mükemmel Sayı') | |
elif sonuc<girilenSayi: | |
print('Eksik Sayı') | |
else: | |
print ('Artık Sayı') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment