n = 6
answer = 0

for i in range(1,n):
    if n % i == 0:
        answer += i
if n == answer:
    print("완전수입니다")
else:
    print("일반수입니다")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: