Skip to content

Commit

Permalink
Merge branch 'PyAr:main' into mvc_e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
its-ChaTTy authored Mar 13, 2024
2 parents aefcd45 + d1cf0e8 commit e111255
Show file tree
Hide file tree
Showing 58 changed files with 891 additions and 333 deletions.
8 changes: 8 additions & 0 deletions _sources/lectures/TWP05/TWP05_16.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ Utilice el intérprete de modo interactivo aquí abajo para solucionar los sigui

“La vida es como andar en bicicleta. Para mantener el equilibrio, debes seguir moviéndote”. - Einstein

.. poll:: TWP05
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?


10 changes: 9 additions & 1 deletion _sources/lectures/TWP05/TWP05_16_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,12 @@ Use the interactive interpreter below to solve the following exercises.
:align: center
:alt:

"Life is like riding a bicycle. To keep your balance, you must keep moving". - Einstein
"Life is like riding a bicycle. To keep your balance, you must keep moving". - Einstein


.. poll:: TWP05E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
9 changes: 8 additions & 1 deletion _sources/lectures/TWP10/TWP10_7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,11 @@ Lista de Ejercicios “again”
:align: center
:alt:

“La vida es como andar en bicicleta. Para mantener el equilibrio, debes seguir moviéndote”. - Einstein
“La vida es como andar en bicicleta. Para mantener el equilibrio, debes seguir moviéndote”. - Einstein

.. poll:: TWP10
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP10/TWP10_7_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,10 @@ Exercise List “again”
:alt:

“Life is like riding a bicycle. To keep balance, you must keep moving”. - Einstein

.. poll:: TWP10E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP15/TWP15_6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ Repeticiones anidadas


“La vida es como andar en bicicleta. Para mantener el equilibrio, debes seguir moviéndote”. - Einstein

.. poll:: TWP15
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
9 changes: 8 additions & 1 deletion _sources/lectures/TWP15/TWP15_6_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@ Nested loops
:align: center
:alt:

"Life is like riding a bicycle. To keep your balance, you must keep moving" - Einstein
"Life is like riding a bicycle. To keep your balance, you must keep moving" - Einstein

.. poll:: TWP15E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP17/TWP17_5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ Lista de Ejercícios “again”
:alt:

“La vida es como andar en bicicleta. Para mantener el equilibrio, debes seguir moviéndote”. - Einstein

.. poll:: TWP17
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
9 changes: 8 additions & 1 deletion _sources/lectures/TWP17/TWP17_5_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ Exercise List "again"
:align: center
:alt:

"Life is like riding a bicycle. To keep your balance, you must keep moving." - Einstein
"Life is like riding a bicycle. To keep your balance, you must keep moving." - Einstein

.. poll:: TWP17E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP18/TWP18_7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ Programación en pareja
:width: 18.201cm
:align: center
:alt:

.. poll:: TWP18
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP18/TWP18_7_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ Pair programming
:width: 18.201cm
:align: center
:alt:

.. poll:: TWP18E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP20/TWP20_5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ Lista de ejercicios "again"
:alt:

“La vida es como andar en bicicleta. Para mantener el equilibrio, debes seguir moviéndote”. - Einstein

.. poll:: TWP20
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
9 changes: 8 additions & 1 deletion _sources/lectures/TWP20/TWP20_5_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ Exercise List "again"
:align: center
:alt:

"Life is like riding a bicycle. To keep your balance, you must keep moving." - Einstein
"Life is like riding a bicycle. To keep your balance, you must keep moving." - Einstein

.. poll:: TWP20E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP23/TWP23_6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@


“La vida es como andar en bicicleta. Para mantener el equilibrio, debes seguir moviéndote”. - Einstein

.. poll:: TWP23
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
9 changes: 8 additions & 1 deletion _sources/lectures/TWP23/TWP23_6_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@ Last Exercise
:alt:


“Life is like riding a bicycle. To keep your balance, you must keep moving.” - Einstein
“Life is like riding a bicycle. To keep your balance, you must keep moving.” - Einstein

.. poll:: TWP23E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP25/TWP25_5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ Múltiple herencia y ¿Qué objeto es?
print(isinstance(wlan0, Ethernet))
print(isinstance(eth0, PCI))
print(isinstance(eth0, USB))

.. poll:: TWP25
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
9 changes: 8 additions & 1 deletion _sources/lectures/TWP25/TWP25_5_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,11 @@ Multiple Inheritance and What Object is It?

print(isinstance(wlan0, Ethernet))
print(isinstance(eth0, PCI))
print(isinstance(eth0, USB))
print(isinstance(eth0, USB))

.. poll:: TWP25E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
55 changes: 16 additions & 39 deletions _sources/lectures/TWP30/TWP30_5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,24 @@ Repeticiones


.. activecode:: ac_l30_5
:language: python3
:python3_interpreter: brython

from browser import document as doc
from browser import html
from browser import timer

print("¡Bienvenido!")
numero = 0

doc <= html.DIV(id="div_juego")

# Creamos el botón para jugar
doc["div_juego"] <= html.BUTTON("Jugar", id="btn_jugar")

# Definimos lo que hará el boton cuando sea apretado
def adivinar():

global numero
numero = int(input("Adivine el número: "))
if numero == 42:
print("¡Ganaste!")
:nocodelens:
:stdin:

import time
print('¡Bienvenido!')
chute = 0
while chute != 42:
g = input('Ingrese un numero: ')
chute = int(g)
if chute == 42:
print('¡Ganaste!')
else:
if numero > 42:
print("Alto")
if chute > 42:
print('Alto')
else:
print("Bajo")

if numero != 42:
# Si el número no se adivinó, se repite la función después de
# 3 segundos
timer.set_timeout(adivinar, 3000)


def empezar(ev):
adivinar()

# Cuando el botón sea apretado, llamará a la función empezar,
# que a su vez llamará a adivinar.
doc["btn_jugar"].bind("click", empezar)

print('Bajo')
time.sleep(1)
print('Fin del juego!')

.. image:: ../img/TWP15_007.png
:height: 14.804cm
Expand Down
53 changes: 18 additions & 35 deletions _sources/lectures/TWP30/TWP30_6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,27 @@ Sortear el número a adivinar


.. activecode:: ac_l30_6
:language: python3
:python3_interpreter: brython
:nocodelens:
:stdin:

from browser import document as doc
from browser import html
from browser import timer
from random import randint

print("¡Bienvenido!")
azar = randint(1, 100)
numero = 0

doc <= html.DIV(id="div_juego_2")

# Creamos una caja de texto donde ingresar el número que queramos
doc["div_juego_2"] <= html.INPUT(id="inp_adivinar", placeholder="Adivine el número", type="number")
# Creamos el botón para adivinar
doc["div_juego_2"] <= html.BUTTON("Enviar adivinanza", id="btn_adivinar") + html.BR()

def confirmar_adivinanza(e):
global numero
numero = int(doc["inp_adivinar"].value)

if numero == azar:
print("¡Ganaste!")
print("¡Fin del juego!")
# Si el número es adivinado, el botón desaparece y el juego
# termina
doc["btn_adivinar"].style.display = "none"
import time

print('¡Bienvenido!')
sorteado = randint(1,100)
chute = 0
while chute != sorteado:
g = input('Ingrese un numero: ')
chute = int(g)
if chute == sorteado:
print('¡Ganaste!')
else:
if chute > sorteado:
print('Alto')
else:
if numero > azar:
print("Alto")
else:
print("Bajo")

# Al apretar el botón, invoca a la función confirmar_adivinanza
doc["btn_adivinar"].bind("click", confirmar_adivinanza)

print('Bajo')
time.sleep(1)
print('Fin del juego!')

¡Ahora sí!
----------
Expand Down
9 changes: 8 additions & 1 deletion _sources/lectures/TWP30/TWP30_7.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Herramientas de Python
======================

+ Condiciones: ``if``, ``elif``, ``else``
+ Hello
+ Ciclo: ``while``
+ Operador de asignación: ``=``
+ Operador de igualdad: ``==``
Expand Down Expand Up @@ -29,3 +29,10 @@ Ahora solo faltan tus ejercicios


“La vida es como andar en bicicleta. Para mantener el equilibrio, debes seguir moviéndote ”. - Einstein

.. poll:: TWP30
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
9 changes: 8 additions & 1 deletion _sources/lectures/TWP30/TWP30_7_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ Now all that's left are your exercises
<br/>


"Life is like riding a bicycle. To keep your balance, you must keep moving." - Einstein
"Life is like riding a bicycle. To keep your balance, you must keep moving." - Einstein

.. poll:: TWP30E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
7 changes: 7 additions & 0 deletions _sources/lectures/TWP33/TWP33_9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@ Herramientas de Python
+ El método ``text.find()`` busca una subcadena.
+ ``float()`` convierte algo a un punto flotante.
+ Bibliotecas: ``urllib.request`` y ``time``.

.. poll:: TWP33
:scale: 3
:allowcomment:

En una escala del 1 (a mejorar) al 3 (excelente),
¿cómo calificaría este capítulo?
9 changes: 8 additions & 1 deletion _sources/lectures/TWP33/TWP33_9_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,11 @@ Python Tools
+ ``text[4:9]`` accesses from the fifth to the ninth character.
+ The method ``text.find()`` searches for a substring.
+ ``float()`` converts something to a floating point number.
+ Libraries: ``urllib.request`` and ``time``.
+ Libraries: ``urllib.request`` and ``time``.

.. poll:: TWP33E
:scale: 3
:allowcomment:

On a scale from 1 (needs improvement) to 3 (excellent),
how would you rate this chapter?
Loading

0 comments on commit e111255

Please sign in to comment.