Skip to content

Instantly share code, notes, and snippets.

View rmgimenez's full-sized avatar

Ricardo Moura Gimenez rmgimenez

View GitHub Profile
/*
* Base structure
*/
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 50px;
}
@rmgimenez
rmgimenez / is_prime.py
Last active June 7, 2016 12:36
Função que verifica se um número é primo em python
def is_prime(n):
if n == 2 or n == 3: return True
if n < 2 or n%2 == 0: return False
if n < 9: return True
if n%3 == 0: return False
r = int(n**0.5)
f = 5
while f <= r:
#print('\t',f)
if n%f == 0: return False