We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6719fb2 + 33830af commit fe23700Copy full SHA for fe23700
Roadmap/17 - ITERACIONES/python/Marlonleon2023.py
@@ -0,0 +1,28 @@
1
+"""/*
2
+ * EJERCICIO:
3
+ * Utilizando tu lenguaje, emplea 3 mecanismos diferentes para imprimir
4
+ * números del 1 al 10 mediante iteración.
5
+ *
6
+ * DIFICULTAD EXTRA (opcional):
7
+ * Escribe el mayor número de mecanismos que posea tu lenguaje
8
+ * para iterar valores. ¿Eres capaz de utilizar 5? ¿Y 10?
9
+ */"""
10
+
11
12
+# con for
13
+print("imprimiendo con for")
14
+for i in range(1,11):
15
+ print(i)
16
17
+# con while
18
19
+print("imprimiendo con while")
20
+contador=0
21
22
+while contador<10:
23
+ contador+=1
24
+ print(contador)
25
26
27
+print("imprimiendo print se utiliza la funcion map")
28
+list(map(print, range(1, 11)))
0 commit comments