-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhile1-semana6.py
More file actions
42 lines (33 loc) · 755 Bytes
/
while1-semana6.py
File metadata and controls
42 lines (33 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# print("Impares menores a 10")
# x = 1
# while x <= 10:
# print(x)
# x += 2
# factorial = 5
# contador = factorial - 1
# while contador > 0 :
# factorial *= contador
# contador -= 1
# print("El factorial de 5 es", factorial)
# for i in 1,2,3 :
# print(i)
# for i in range(3) :
# print(i)
# for i in ["Ale", "Ivan", "Monse", "Luis", "Rafa", "Luca"] :
# print(i)
# for i in "Hola Mundo" :
# if i == "M" :
# pass
# else :
# print(i, end= "")
for i in range(2, 100) :
primo = True
for j in range(2, i):
if i == j :
break
elif i % j == 0 :
primo == False
else :
continue
if primo == True :
print(i, end = "")