Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! usr/bin/python
- #numeros primos
- num = int(raw_input("Inserta el numero que quieras comprobar si es primo "))
- for i in range(2, num):
- if num % i == 0;
- print num, 'No es primo'
- break
- else:
- print num, 'es primo'
- break
Advertisement
Add Comment
Please, Sign In to add comment