Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # coding: utf-8
- p = 1
- while p is 1:
- def verificar_se_perfeito(n):
- '''
- VERIFICA SE UM NÚMERO É PERFEITO OU Ñ
- '''
- teste = 0
- for x in range(1, n):
- if n % x == 0:
- teste += x
- if teste == n:
- return n
- else:
- pass
- a = []
- for x in xrange(0, 10001):
- print 'loading...'
- if verificar_se_perfeito(x):
- a.append(verificar_se_perfeito(x))
- else:
- print('mostrando a:', a)
- p = 0
Advertisement
Add Comment
Please, Sign In to add comment