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-datos-numeros.rst:9 msgid "Datos numéricos" msgstr "Numerical data" #: ../../source/python-datos-numeros.rst:10 msgid "" "En Python existen diferentes tipos de datos numéricos que se pueden utilizar" " para trabajar con números. Los principales tipos de datos numéricos son los" " enteros (int), los números de punto flotante (float) y los números " "complejos (complex) que, por ahora, no vamos a tratar." msgstr "" "In Python there are different types of numerical data that can be used to " "work with numbers. The main types of numerical data are integers (int), " "floating point numbers (float) and complex numbers (complex) which, for now," " we are not going to discuss." #: ../../source/python-datos-numeros.rst:19 msgid "Enteros" msgstr "Integers" #: ../../source/python-datos-numeros.rst:17 msgid "" "Los enteros son números enteros, positivos o negativos sin decimales. Por " "ejemplo: 1, -2 y 100" msgstr "" "Integers are whole numbers, positive or negative without decimals. For " "example: 1, -2 and 100" #: ../../source/python-datos-numeros.rst:23 msgid "Punto flotante" msgstr "Floating point" #: ../../source/python-datos-numeros.rst:22 msgid "" "Los números de punto flotante son números con decimales. Por ejemplo: 1.5, " "3.14 y -0.75" msgstr "" "Floating point numbers are numbers with decimals. For example: 1.5, 3.14 and" " -0.75" #: ../../source/python-datos-numeros.rst:26 msgid "" "En Python los decimales se separan con un punto. En español no es la forma " "correcta de separar los decimales, puesto que se utiliza la coma, pero los " "decimales en Python no se traducen del estándar anglosajón al estándar " "español porque esto daría lugar a errores en el código." msgstr "" "In Python, decimals are separated with a period. In Spanish it is not the " "correct way to separate decimals, since the comma is used, but decimals in " "Python are not translated from the Anglo-Saxon standard to the Spanish " "standard because this would lead to errors in the code." #: ../../source/python-datos-numeros.rst:32 msgid "" "En Python es fácil trabajar con estos tipos de datos numéricos utilizando " "operadores matemáticos comunes como la suma, la resta, la multiplicación, la" " división o la potencia. También es posible realizar operaciones más " "avanzadas como el cálculo del módulo, redondeo, truncamiento, funciones " "trigonométricas, etc. utilizando funciones especiales." msgstr "" "In Python it is easy to work with these types of numerical data using common" " mathematical operators such as addition, subtraction, multiplication, " "division or power. It is also possible to perform more advanced operations " "such as module calculation, rounding, truncation, trigonometric functions, " "etc. using special functions." #: ../../source/python-datos-numeros.rst:41 msgid "Operaciones con números enteros" msgstr "Operations with whole numbers" #: ../../source/python-datos-numeros.rst:42 msgid "" "Los números enteros son números sin decimales. Las operaciones básicas que " "se pueden aplicar a los números enteros son las siguientes:" msgstr "" "Whole numbers are numbers without decimals. The basic operations that can be" " applied to integers are the following:" #: ../../source/python-datos-numeros.rst:49 #: ../../source/python-datos-numeros.rst:123 msgid "Símbolo" msgstr "Symbol" #: ../../source/python-datos-numeros.rst:50 #: ../../source/python-datos-numeros.rst:124 msgid "Operación" msgstr "Operation" #: ../../source/python-datos-numeros.rst:51 #: ../../source/python-datos-numeros.rst:125 msgid "``+``" msgstr "``+``" #: ../../source/python-datos-numeros.rst:52 #: ../../source/python-datos-numeros.rst:126 msgid "Suma" msgstr "Addition" #: ../../source/python-datos-numeros.rst:53 #: ../../source/python-datos-numeros.rst:127 msgid "``-``" msgstr "``-``" #: ../../source/python-datos-numeros.rst:54 #: ../../source/python-datos-numeros.rst:128 msgid "Resta" msgstr "Subtraction" #: ../../source/python-datos-numeros.rst:55 #: ../../source/python-datos-numeros.rst:129 msgid "``*``" msgstr "``*``" #: ../../source/python-datos-numeros.rst:56 #: ../../source/python-datos-numeros.rst:130 msgid "Multiplicación" msgstr "Multiplication" #: ../../source/python-datos-numeros.rst:57 msgid "``//``" msgstr "``//``" #: ../../source/python-datos-numeros.rst:58 msgid "División entera (sin calcular decimales)" msgstr "Integer division (without calculating decimals)" #: ../../source/python-datos-numeros.rst:59 #: ../../source/python-datos-numeros.rst:133 msgid "``%``" msgstr "``%``" #: ../../source/python-datos-numeros.rst:60 #: ../../source/python-datos-numeros.rst:134 msgid "Resto de una división" msgstr "Remainder of a division" #: ../../source/python-datos-numeros.rst:61 #: ../../source/python-datos-numeros.rst:135 msgid "``**``" msgstr "``**``" #: ../../source/python-datos-numeros.rst:62 #: ../../source/python-datos-numeros.rst:136 msgid "Potencia (elevado a un número)" msgstr "Power (raised to a number)" #: ../../source/python-datos-numeros.rst:64 #: ../../source/python-datos-numeros.rst:140 msgid "" "Copia los siguientes ejemplos en el entorno IDLE para comprobar que " "funcionan correctamente:" msgstr "" "Copy the following examples to the IDLE environment to verify that they work" " correctly:" #: ../../source/python-datos-numeros.rst:80 msgid "" "Los números enteros en Python pueden ser muy grandes y tener muchísimas " "cifras de precisión:" msgstr "Integers in Python can be very large and have many precision figures:" #: ../../source/python-datos-numeros.rst:105 msgid "Operaciones con números en coma flotante" msgstr "Operations with floating point numbers" #: ../../source/python-datos-numeros.rst:106 msgid "Los números en coma flotante son números con decimales." msgstr "Floating point numbers are numbers with decimals." #: ../../source/python-datos-numeros.rst:108 msgid "" "Los números en coma flotante pierden la gran precisión que tienen los " "números enteros y almacenan solo 16 cifras de precisión. El tamaño máximo de" " un número de coma flotante también es más reducido (10^307) que el tamaño " "máximo de un número entero (10^4300)." msgstr "" "Floating point numbers lose the high precision that integers have and store " "only 16 digits of precision. The maximum size of a floating point number is " "also smaller (10^307) than the maximum size of an integer (10^4300)." #: ../../source/python-datos-numeros.rst:113 msgid "" "El número entero 2 en coma flotante se verá como 2.0, con un cero añadido " "después del punto decimal." msgstr "" "The floating point integer 2 will look like 2.0, with a zero added after the" " decimal point." #: ../../source/python-datos-numeros.rst:116 msgid "" "Las operaciones básicas que se pueden aplicar a los números en coma flotante" " son las siguientes:" msgstr "" "The basic operations that can be applied to floating point numbers are the " "following:" #: ../../source/python-datos-numeros.rst:131 msgid "``/``" msgstr "``/``" #: ../../source/python-datos-numeros.rst:132 msgid "División con decimales" msgstr "Division with decimals" #: ../../source/python-datos-numeros.rst:137 msgid "``round(number, digits)``" msgstr "``round(number, digits)``" #: ../../source/python-datos-numeros.rst:138 msgid "Redondea un número en coma flotante a ``digits`` decimales." msgstr "Rounds a floating point number to decimal ``digits``." #: ../../source/python-datos-numeros.rst:160 msgid "Errores decimales en coma flotante" msgstr "Floating Point Decimal Errors" #: ../../source/python-datos-numeros.rst:161 msgid "" "Los números en coma flotante se almacenan dentro del ordenador como números " "binarios (compuestos por ceros y unos) y no como números decimales. La " "representación de estos números en la pantalla se realiza convirtiendo los " "números binarios en números en formato decimal. Esto hace que se produzcan " "errores a la hora de almacenar y de realizar cálculos con decimales. Un " "ejemplo práctico es la siguiente suma:" msgstr "" "Floating point numbers are stored within the computer as binary numbers " "(made up of zeros and ones) and not as decimal numbers. The representation " "of these numbers on the screen is done by converting binary numbers into " "numbers in decimal format. This causes errors when storing and performing " "calculations with decimals. A practical example is the following sum:" #: ../../source/python-datos-numeros.rst:177 msgid "" "Los números decimales se almacenan con un pequeño error que no es visible en" " la pantalla. Sin embargo la suma de los dos números decimales da como " "resultado un número con un pequeño error que sí es visible en el decimal " "número 17." msgstr "" "Decimal numbers are stored with a small error that is not visible on the " "screen. However, the sum of the two decimal numbers results in a number with" " a small error that is visible in decimal number 17." #: ../../source/python-datos-numeros.rst:182 msgid "" "Estos errores de redondeo se producen solo con la parte decimal de los " "números en coma flotante y no se producen con los números enteros, aunque " "los almacenemos en formato de coma flotante:" msgstr "" "These rounding errors occur only with the decimal part of floating-point " "numbers and do not occur with integers, even if we store them in floating-" "point format:" #: ../../source/python-datos-numeros.rst:193 msgid "Conversión de tipos" msgstr "Type conversion" #: ../../source/python-datos-numeros.rst:194 msgid "" "Hay varios casos en los que se pueden convertir datos de números enteros a " "coma flotante o viceversa." msgstr "" "There are several cases in which data can be converted from integers to " "floating point or vice versa." #: ../../source/python-datos-numeros.rst:205 msgid "División de dos números enteros" msgstr "Division of two integers" #: ../../source/python-datos-numeros.rst:198 msgid "" "La operación división con decimales ``/`` aplicada a números enteros puede " "dar como resultado un número con decimales, que se almacenará como un número" " en coma flotante." msgstr "" "The ``/`` decimal division operation applied to integers can result in a " "decimal number, which will be stored as a floating point number." #: ../../source/python-datos-numeros.rst:217 msgid "Operaciones mixtas entre enteros y flotantes" msgstr "Mixed operations between integers and floats" #: ../../source/python-datos-numeros.rst:208 msgid "" "Una operación cualquiera entre un número entero y un número en coma flotante" " dará como resultado un número en coma flotante." msgstr "" "Any operation between an integer and a floating point number will result in " "a floating point number." #: ../../source/python-datos-numeros.rst:234 msgid "Forzar la conversión de tipos" msgstr "Force type conversion" #: ../../source/python-datos-numeros.rst:220 msgid "" "Se puede forzar que un número se convierta de un tipo a otro tipo con las " "siguientes funciones:" msgstr "" "You can force a number to be converted from one type to another type with " "the following functions:" #: ../../source/python-datos-numeros.rst:223 msgid "" "``int(n)`` Convierte n en un número entero eliminando la parte decimal." msgstr "``int(n)`` Converts n to an integer by removing the decimal part." #: ../../source/python-datos-numeros.rst:224 msgid "``float(n)`` Convierte n en un número en coma flotante." msgstr "``float(n)`` Converts n to a floating point number." #: ../../source/python-datos-numeros.rst:226 msgid "Ejemplos de conversiones (también llamadas cast):" msgstr "Examples of conversions (also called cast):" #: ../../source/python-datos-numeros.rst:237 msgid "Otras operaciones matemáticas" msgstr "Other mathematical operations" #: ../../source/python-datos-numeros.rst:238 msgid "" "Para realizar más operaciones matemáticas con números enteros o con números " "en coma flotante, es necesario importar la librería `math " "`__ que da acceso a multitud" " de operaciones matemáticas avanzadas." msgstr "" "To perform more mathematical operations with integers or floating point " "numbers, it is necessary to import the `math " "`__ library, which gives " "access to many of advanced mathematical operations." #: ../../source/python-datos-numeros.rst:243 msgid "" "Antes de utilizar la librería 'math' es necesario importarla dentro de " "nuestro programa. La palabra clave ``import`` se utiliza para importar " "cualquier librería de Python, que dará acceso a muchas funciones extras." msgstr "" "Before using the 'math' library it is necessary to import it into our " "program. The ``import`` keyword is used to import any Python library, which " "will give access to many extra functions." #: ../../source/python-datos-numeros.rst:248 msgid "Este es un ejemplo:" msgstr "This is an example:" #: ../../source/python-datos-numeros.rst:256 msgid "" "En este ejemplo se ha utilizado la función ``math.gcd()`` que devuelve el " "máximo común divisor (greatest common divisor) de varios números." msgstr "" "In this example, the ``math.gcd()`` function has been used, which returns " "the greatest common divisor of several numbers." #: ../../source/python-datos-numeros.rst:259 msgid "" "Se pueden ver todas las funciones de la librería ``math`` en la " "`documentación oficial del lenguaje Python " "`__." msgstr "" "You can see all the functions of the ``math`` library in the `official " "documentation of the Python language " "`__." #: ../../source/python-datos-numeros.rst:265 msgid "Ejercicios" msgstr "Exercises" #: ../../source/python-datos-numeros.rst:267 msgid "Calcula la suma de las siguientes distancias: 100m, 15m, 50m, 80m" msgstr "Calculate the sum of the following distances: 100m, 15m, 50m, 80m" #: ../../source/python-datos-numeros.rst:269 msgid "" "Calcula el cuadrado de 55 sabiendo que el cuadrado de un número es " "equivalente a elevar ese número a 2." msgstr "" "Calculate the square of 55 knowing that the square of a number is equivalent" " to raising that number to 2." #: ../../source/python-datos-numeros.rst:272 msgid "El resultado debe dar 3025" msgstr "The result should be 3025" #: ../../source/python-datos-numeros.rst:274 msgid "Calcula la media de estas notas: 6, 7, 6, 8" msgstr "Calculate the average of these grades: 6, 7, 6, 8" #: ../../source/python-datos-numeros.rst:276 msgid "" "Se deben sumar todos los números y dividir el resultado entre cuatro. " "Utiliza paréntesis para que la operación funcione bien. (6 + 7 + 6 + 8) / 4" msgstr "" "All the numbers must be added and the result divided by four. Use " "parentheses so the operation works well. (6 + 7 + 6 + 8) / 4" #: ../../source/python-datos-numeros.rst:280 msgid "El resultado debe dar 6.75" msgstr "The result should be 6.75" #: ../../source/python-datos-numeros.rst:282 msgid "Redondea el resultado anterior a un solo decimal." msgstr "Round the previous result to a single decimal." #: ../../source/python-datos-numeros.rst:284 msgid "El resultado debe dar 6.8" msgstr "The result should be 6.8" #: ../../source/python-datos-numeros.rst:286 msgid "Calcula el resto de dividir 53 entre 7." msgstr "Calculate the remainder of dividing 53 by 7." #: ../../source/python-datos-numeros.rst:288 msgid "El resultado debe dar 4" msgstr "The result should be 4" #: ../../source/python-datos-numeros.rst:290 msgid "" "Calcula el siguiente número a 80 que dividido entre 7 da como resto cero." msgstr "" "Calculate the next number to 80 that divided by 7 gives the remainder zero." #: ../../source/python-datos-numeros.rst:293 msgid "" "Debes utilizar el operador resto de una división ``% 7`` con cada uno de los" " números 80, 81, 82, 83, etc. hasta que el resto valga cero." msgstr "" "You must use the remainder operator of a division ``% 7`` with each of the " "numbers 80, 81, 82, 83, etc. until the remainder is worth zero."