Created
October 29, 2020 13:08
-
-
Save soyHouston256/89efaaadeb7d1ef9f550ce3d444ee2c6 to your computer and use it in GitHub Desktop.
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
def run(): | |
numero = int(input("Ingrese su numero")) | |
cont = 0 | |
for i in range(1,numero+1): | |
if i==1 or i==numero: | |
continue | |
if numero % i == 0: | |
cont +=1 | |
if cont == 0: | |
return True | |
else: | |
return False | |
if __name__ == "__main__": | |
if(run()): | |
print("Si es primo") | |
else: | |
print("No es primo") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment