msgid "" msgstr "" "Project-Id-Version:Tecno Recursos 2023" "Report-Msgid-Bugs-To:" "POT-Creation-Date:2023-09-19 15:16+0200" "PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE" "Last-Translator:FULL NAME " "Language:en" "Language-Team:en " "Plural-Forms:nplurals=2; plural=(n != 1)" "MIME-Version:1.0" "Content-Type:text/plain; charset=utf-8" "Content-Transfer-Encoding:8bit" "Generated-By:Babel 2.9.0" #: ../../source/python-busqueda.rst:9 msgid "Búsqueda de datos" msgstr "Data search" #: ../../source/python-busqueda.rst:10 msgid "" "En este apartado vamos a estudiar cómo buscar datos dentro de una lista. " "Existen numerosas funciones y métodos de Python para conseguirlo, pero en " "esta unidad se van a estudiar los algoritmos de búsqueda sin su ayuda para " "poder aprender cómo funcionan estos algoritmos internamente." msgstr "" "In this section we are going to study how to search for data within a list. " "There are numerous Python functions and methods to achieve this, but in this" " unit we will study search algorithms without your help in order to learn " "how these algorithms work internally." #: ../../source/python-busqueda.rst:17 msgid "Búsqueda lineal de datos" msgstr "Linear data search" #: ../../source/python-busqueda.rst:18 msgid "" "El algoritmo más sencillo para buscar un dato en una lista consiste en ir " "recorriendo todos los elementos de la lista, uno a uno, hasta encontrar " "aquel que estamos buscando." msgstr "" "The simplest algorithm to search for data in a list consists of going " "through all the elements in the list, one by one, until we find the one we " "are looking for." #: ../../source/python-busqueda.rst:22 msgid "" "En este caso vamos a programar una búsqueda lineal del menor elemento de una" " lista de datos." msgstr "" "In this case we are going to program a linear search for the smallest " "element of a list of data." #: ../../source/python-busqueda.rst:25 msgid "" "Una variable guardará la posición del menor elemento encontrado hasta el " "momento e iremos actualizando esta posición a medida que vayamos encontrando" " otros elementos menores::" msgstr "" "A variable will save the position of the smallest element found so far and " "we will update this position as we find other minor elements::" #: ../../source/python-busqueda.rst:53 msgid "El resultado es el siguiente::" msgstr "The result is as follows::" #: ../../source/python-busqueda.rst:60 msgid "Ejercicios" msgstr "Exercises" #: ../../source/python-busqueda.rst:62 msgid "" "Escribe un programa con una función que busque el elemento mayor de una " "lista. Llama a esa función con la lista de números anterior para comprobar " "que el resultado es el elemento 3 que vale 99." msgstr "" "Write a program with a function that finds the largest element in a list. " "Call that function with the previous list of numbers to check that the " "result is element 3 which is worth 99." #: ../../source/python-busqueda.rst:67 msgid "" "Escribe una función que devuelva la posición del último elemento par de una " "lista. Si no existe ningún número par, el resultado devuelto debe ser la " "constante ``None`` para indicar que no existe ninguno." msgstr "" "Write a function that returns the position of the last even element in a " "list. If no even number exists, the return result must be the constant " "``None`` to indicate that none exists." #: ../../source/python-busqueda.rst:71 msgid "" "Llama a la función con la lista de números anterior para comprobar que el " "resultado es la posición 16, número 46." msgstr "" "Call the function with the list of numbers above to check that the result is" " position 16, number 46." #: ../../source/python-busqueda.rst:74 ../../source/python-busqueda.rst:117 #: ../../source/python-busqueda.rst:145 msgid "Pista::" msgstr "Clue::" #: ../../source/python-busqueda.rst:93 ../../source/python-busqueda.rst:107 #: ../../source/python-busqueda.rst:173 msgid "Resultado::" msgstr "Result::" #: ../../source/python-busqueda.rst:99 msgid "" "Escribe una función que devuelva la posición del primer elemento impar de " "una lista. Si no existe ningún número impar, el resultado devuelto debe ser " "la constante ``None`` para indicar que no existe ninguno." msgstr "" "Write a function that returns the position of the first odd element in a " "list. If no odd number exists, the return result must be the constant " "``None`` to indicate that none exist." #: ../../source/python-busqueda.rst:104 msgid "" "Llama a la función con la lista de números anterior para comprobar que el " "resultado es la posición 0, número 75." msgstr "" "Call the function with the list of numbers above to check that the result is" " position 0, number 75." #: ../../source/python-busqueda.rst:113 msgid "" "Escribe una función que cuente las veces que se encuentra un elemento en una" " lista. Llama a esa función para calcular cuántas veces aparece el elemento " "5 en una lista de notas." msgstr "" "Write a function that counts the number of times an item is found in a list." " Call that function to calculate how many times item 5 appears in a list of " "notes." #: ../../source/python-busqueda.rst:134 msgid "" "Modifica el programa anterior con un bucle que busque cuántas veces aparecen" " todas las notas desde el 0 hasta el 10." msgstr "" "Modify the above program with a loop that finds how many times all the notes" " from 0 to 10 appear." #: ../../source/python-busqueda.rst:138 msgid "" "Modifica el programa de búsqueda del elemento menor de una lista. Añade al " "programa otra función que vaya buscando una y otra vez el elemento menor, " "que lo imprima en pantalla y que lo borre de la lista con la función " "``del()``. El resultado final debe ser que imprima todos los elementos de la" " lista ordenados de menor a mayor." msgstr "" "Modifies the search program for the smallest element of a list. Add another " "function to the program that searches again and again for the smallest " "element, prints it on the screen and deletes it from the list with the " "``del()`` function. The end result should be that it prints all the elements" " in the list ordered from smallest to largest."