From ec027665a9a8877c2b506200f4856f72f9c0ea17 Mon Sep 17 00:00:00 2001 From: DennisEckerskorn Date: Thu, 24 Oct 2024 19:27:44 +0200 Subject: [PATCH] Little update --- ejercicios_hilos/ej04/ej04.py | 9 +++++++++ ejercicios_hilos/ej04/html_examples/1.html | 11 +++++++++++ ejercicios_hilos/ej04/html_examples/2.html | 11 +++++++++++ ejercicios_hilos/ej04/html_examples/index.html | 9 +++++++++ resources/salida.txt | 1 + 5 files changed, 41 insertions(+) create mode 100644 ejercicios_hilos/ej04/ej04.py create mode 100644 ejercicios_hilos/ej04/html_examples/1.html create mode 100644 ejercicios_hilos/ej04/html_examples/2.html create mode 100644 ejercicios_hilos/ej04/html_examples/index.html create mode 100644 resources/salida.txt diff --git a/ejercicios_hilos/ej04/ej04.py b/ejercicios_hilos/ej04/ej04.py new file mode 100644 index 0000000..7c08ebf --- /dev/null +++ b/ejercicios_hilos/ej04/ej04.py @@ -0,0 +1,9 @@ +def escribir_en_fichero(variable): + with open('resources/salida.txt', 'w') as archivo: + archivo.write(f"El valor de la variable es: {variable}\n") + print("El valor ha sido escrito en el fichero 'salida.txt'.") + + +mi_variable = 42 + +escribir_en_fichero(mi_variable) \ No newline at end of file diff --git a/ejercicios_hilos/ej04/html_examples/1.html b/ejercicios_hilos/ej04/html_examples/1.html new file mode 100644 index 0000000..a818cc2 --- /dev/null +++ b/ejercicios_hilos/ej04/html_examples/1.html @@ -0,0 +1,11 @@ + + + + Página 1 + + + Ir a página 2 +
+ Volver + + \ No newline at end of file diff --git a/ejercicios_hilos/ej04/html_examples/2.html b/ejercicios_hilos/ej04/html_examples/2.html new file mode 100644 index 0000000..0635933 --- /dev/null +++ b/ejercicios_hilos/ej04/html_examples/2.html @@ -0,0 +1,11 @@ + + + + Página 2 + + + Ir a página 1 +
+ Volver + + \ No newline at end of file diff --git a/ejercicios_hilos/ej04/html_examples/index.html b/ejercicios_hilos/ej04/html_examples/index.html new file mode 100644 index 0000000..cf1c6dd --- /dev/null +++ b/ejercicios_hilos/ej04/html_examples/index.html @@ -0,0 +1,9 @@ + + + + Inicio + + + Ir a página 1 + + \ No newline at end of file diff --git a/resources/salida.txt b/resources/salida.txt new file mode 100644 index 0000000..e138256 --- /dev/null +++ b/resources/salida.txt @@ -0,0 +1 @@ +El valor de la variable es: 42