Created
August 6, 2013 11:53
-
-
Save psicobyte/6163842 to your computer and use it in GitHub Desktop.
Ejemplo para el Curso de Introducción a Python del Centro de Enseñanzas Virtuales de la Universidad de Granada
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
for numero in range(2,100): | |
for divisor in range(2,numero): | |
if numero % divisor == 0: | |
print numero, 'es múltiplo de', divisor, 'y', numero/divisor | |
break | |
else: | |
print numero, 'es un número primo' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment