Skip to content

Instantly share code, notes, and snippets.

@soyHouston256
Created October 29, 2020 13:08
Show Gist options
  • Save soyHouston256/89efaaadeb7d1ef9f550ce3d444ee2c6 to your computer and use it in GitHub Desktop.
Save soyHouston256/89efaaadeb7d1ef9f550ce3d444ee2c6 to your computer and use it in GitHub Desktop.
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