Skip to content
Snippets Groups Projects
Commit 29c663cf authored by Oscar Danilo Lopez Jaime's avatar Oscar Danilo Lopez Jaime
Browse files

Subir nuevo archivo

parent 4afd223b
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id:ac852276-5e03-4b66-89f2-f742ea084b11 tags:
``` python
def primo(x):
if x < 2:
return False
for y in range(2, x):
if x % y == 0:
return False
return True
primos = [num for num in range(1, 151) if primo(num)]
print(primos)
```
%% Output
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149]
%% Cell type:code id:943dac33-2383-4ba1-9152-a88b4eafda6b tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment