Skip to content

Instantly share code, notes, and snippets.

@gun007
Created October 25, 2018 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gun007/50a7c438957dd7e77d1e1268826ee6e2 to your computer and use it in GitHub Desktop.
Save gun007/50a7c438957dd7e77d1e1268826ee6e2 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# -*- coding: latin1 -*-
print ("primo 1")
for i in range (2,101):
x = 0;
for j in range (1,101):
if i % j == 0:
x+=1
if x == 2:
print ("primo", i)
else:
print ("não é primo", i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment