2. Impresión de 1 a 3

2.1. Forma simple

Activity: CodeLens 2.1.1 (cl_l15_2a)

2.2. Usando una variable

Activity: CodeLens 2.2.1 (cl_l15_2b)

2.3. Incrementando la variable

Activity: CodeLens 2.3.1 (cl_l15_2c)

2.4. Usando while

Activity: CodeLens 2.4.1 (cl_l15_2d)

2.4.1. Prueba de escritorio

x = 1
while x <= 3:
    print(x)
    x = x + 1
Prueba de escritorio

x

Pantalla

-1-

1

-2-

2

-3-

3

4

Activity: CodeLens 2.4.1.1 (cl_l15_2e)

You have attempted of activities on this page