msgid "" msgstr "" "Project-Id-Version: Tecno Recursos 2023Report-Msgid-Bugs-To:POT-Creation-" "Date:2023-07-20 19:13+0200PO-Revision-Date:YEAR-MO-DA HO:MI+ZONELast-" "Translator:FULL NAME Language:enLanguage-Team:en " "Plural-Forms:nplurals=2; plural=(n != 1)MIME-Version:1" ".0Content-Type:text/plain; charset=utf-8Content-Transfer-Encoding" ":8bitGenerated-By:Babel 2.9.0Report-Msgid-Bugs-To:EMAIL@ADDRESSPOT-" "Creation-Date:2023-07-26 11:40+0200PO-Revision-Date:YEAR-MO-DA HO:MI" "+ZONELast-Translator:FULL NAME Language-Team:LANGUAGE " "MIME-Version:1.0Content-Type:text/plain; charset=utf-8Content-" "Transfer-Encoding:8bitGenerated-By:Babel 2.9.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2023-10-18 17:17+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.0\n" #: ../../source/python-if-else.rst:9 msgid "Sentencia ``if`` ``else``" msgstr "``if`` ``else`` statement" #: ../../source/python-if-else.rst:10 msgid "" "La sentencia ``if`` ``else`` sirve para ejecutar un bloque de código si " "se cumple una condición y otro bloque de código distinto si no se cumple " "la condición." msgstr "" "The ``if`` ``else`` statement is used to execute a block of code if a " "condition is met and a different block of code if the condition is not " "met." #: ../../source/python-if-else.rst:14 msgid "" "Esta es una sentencia de **control de flujo**, es decir, que controla el " "orden en el que se ejecutan las instrucciones del programa." msgstr "" "This is a **control flow** statement, that is, it controls the order in " "which the instructions of the program are executed." #: ../../source/python-if-else.rst:17 msgid "Ejemplo::" msgstr "Example::" #: ../../source/python-if-else.rst:26 msgid "" "En este ejemplo, si la variable \"edad\" es mayor o igual a 18, se " "imprimirá \"Eres mayor de edad\". De lo contrario, se imprimirá \"Eres " "menor de edad\"." msgstr "" "In this example, if the variable \"age\" is greater than or equal to 18, " "\"You are of legal age\" will be printed. Otherwise, \"You are a minor\" " "will be printed." #: ../../source/python-if-else.rst:32 msgid "Sangría de código" msgstr "code indentation" #: ../../source/python-if-else.rst:33 msgid "" "En Python las instrucciones que pertenecen al bloque ``if`` deben " "escribirse con un desplazamiento hacia la derecha llamado sangría." msgstr "" "In Python, statements belonging to the ``if`` block must be written with " "an offset to the right called an indentation." #: ../../source/python-if-else.rst:36 msgid "" "Esta sangría, por convención, es de 4 espacios. Se puede desplazar el " "código otra cantidad diferente de espacios y funcionará, pero es " "conveniente acatar esta costumbre porque es lo que hace la mayoría de " "programadores de Python." msgstr "" "This indentation, by convention, is 4 spaces. You can offset the code a " "different number of spaces and it will work, but it's a good idea to " "stick to this custom because it's what most Python programmers do." #: ../../source/python-if-else.rst:41 msgid "" "Todas las instrucciones que estén desplazadas se ejecutarán dependiendo " "de si la sentencia ``if`` se cumple. Las órdenes que se encuentren sin " "desplazar se ejecutarán siempre::" msgstr "" "All statements that are offset will be executed depending on whether the " "``if`` statement is true. Orders that are not moved will always be " "executed::" #: ../../source/python-if-else.rst:54 msgid "" "En otros lenguajes de programación también hay que desplazar el código a " "la derecha para mejorar la visualización de la estructura del programa, " "pero no es obligatorio, ya que existen sentencias o caracteres que " "definen con precisión el inicio y el final de cada bloque." msgstr "" "In other programming languages, you also have to move the code to the " "right to improve the visualization of the program structure, but it is " "not mandatory, since there are statements or characters that precisely " "define the start and end of each block." #: ../../source/python-if-else.rst:59 msgid "" "En Python, en cambio, es obligatorio realizar el sangrado del código para" " que el programa pueda funcionar sin problemas." msgstr "" "In Python, on the other hand, it is mandatory to indent the code so that " "the program can work without problems." #: ../../source/python-if-else.rst:62 msgid "" "Si el desplazamiento de las líneas de código no es regular, también se " "producirá un error::" msgstr "" "If the offset of the lines of code is not regular, an error will also be " "thrown::" #: ../../source/python-if-else.rst:72 msgid "" "Más adelante veremos cómo este desplazamiento o sangría se utiliza en " "todas las instrucciones de Python que terminan con dos puntos ':' y que " "tienen bloques de código subordinados, tales como los bucles, las " "funciones, las clases, etc." msgstr "" "Later we will see how this displacement or indentation is used in all " "Python statements that end with a colon ':' and that have subordinate " "code blocks, such as loops, functions, classes, etc." #: ../../source/python-if-else.rst:79 msgid "Ejercicios" msgstr "Exercises" #: ../../source/python-if-else.rst:81 msgid "" "Escribe un programa que compruebe si un número es positivo o negativo y " "que imprima en pantalla el resultado." msgstr "" "Write a program that checks if a number is positive or negative and " "prints the result on the screen." #: ../../source/python-if-else.rst:84 ../../source/python-if-else.rst:97 #: ../../source/python-if-else.rst:112 msgid "Pista::" msgstr "Clue::" #: ../../source/python-if-else.rst:91 msgid "Escribe un programa que compruebe si un número es par o impar." msgstr "Write a program that checks if a number is even or odd." #: ../../source/python-if-else.rst:93 msgid "" "Para saber si un número es par (divisible por dos) es necesario calcular " "el resto de la división por dos. Si el resto vale cero significa que el " "número es divisible por dos y es par." msgstr "" "To know if a number is even (divisible by two) it is necessary to " "calculate the remainder of the division by two. If the remainder is zero " "it means that the number is divisible by two and is even." #: ../../source/python-if-else.rst:104 msgid "" "Escribe un programa que pida dos números y escriba cuál de los dos es " "mayor que el otro." msgstr "" "Write a program that asks for two numbers and writes which of the two is " "greater than the other." #: ../../source/python-if-else.rst:108 msgid "" "Escribe un programa que compruebe si una condición es verdadera o es " "falsa. Comprueba que el programa funciona tanto si la condición es " "verdadera (True) como si es falsa (False)." msgstr "" #: ../../source/python-if-else.rst:122 msgid "" "Escribe un programa que pida una nota y compruebe si la nota está " "aprobada o suspensa." msgstr "" "Write a program that asks for a grade and checks if the grade is passed " "or failed." #: ../../source/python-if-else.rst:126 msgid "" "Escribe un programa que pida una contraseña y compruebe si la contraseña " "es igual a la palabra 'secreto'. En caso afirmativo debe escribir en " "pantalla 'contraseña correcta'. En caso contrario debe escribir en " "pantalla 'contraseña incorrecta'." msgstr "" "Write a program that asks for a password and checks if the password is " "equal to the word 'secret'. If so, you must write 'correct password' on " "the screen. Otherwise you must write 'wrong password' on the screen."