Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Avas committed May 17, 2017
2 parents 80d9edc + fa61a73 commit f27028e
Show file tree
Hide file tree
Showing 23 changed files with 123 additions and 107 deletions.
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ deploy:
tags: true
password:
secure: !!binary |
cjQ4dU9TcGt6N0UxY1c1WnpZRHk0bEVkTWI2eFlhMXh0cXJMTWs0bFFmY0hyRXMzb3MvNUZWbWlq
TjFjTFM4QkJSNVpGb25vWDZhU2oxRXVRYmJYMm5oTm9HMEhiMnVJREw4NitENFNFbHdRTDJwWFRi
KytBRUlmdTQ2SmN1UklkREl0U1VHZi9udkZDM0RpUzNvLy9HaGhqRmQ2Yk5WaVdEQzBqNUlMeENz
ZjNkWjQrYThLam5MRGN1SVZTVjJxd0dvQVEwV1lOSmJEN2x6S2xCdWN6SG1xVGd6R3JGdnR2UHBu
K0ZCSC9tbnVLQVlXT2xBaWVBQ1gyWTlRQjdkZ2QvVzFvZW16VytSM3Y4NW9nb01FU0lVa2dLMHN4
ZFUzVXZsRG5TeTRUOEh3MGVuZGZMWmxMbkQ5M1NIeXZhSHplMlJ1Ry9rUC9tRDBaK0FIZWwyeWZs
QStJT1RmS3BnYWlONElwZjJYZFU2TllDS2VJQVJDdHNWaGJQTDVqbFF1dzdGbU0yT1JvZUZlY0tO
MzBCWkdDRjl4bjlWVG1aQitoWUhSeDFhdHFKU0NCdXVENXhibzQ2d1E4Q0VSOGZiL2dZVVJwcmRJ
ZDF6OXFjOWpxM2NwMW9mRlpTaWNZTkJIV2V5R281Y2ZtNFlhbXRCSlo4UWZqVTdySE1URDFGRHF4
NlNCc256VXlUZWRNdmN5V3YxMEt6VUVLeG1oR2xDb3lvVXRRQy9yWGROMXhEMUhOQzdNRzBLZG1O
K1ZMa2twOXEwemd6dDQvSlpuSFVoYkkvM3h0bmtPZy83ZE4wS253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expand Down
22 changes: 11 additions & 11 deletions py101/classes/README.es.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Clases and Objectos

Las clases son una encapsulación de estado y comportamiento, definido por
variables y miembros respectivamente, en un solo tipo. Los objetos son
instancias de clases que tienen sus variables y funciones desde una clase.
Las clases son esencialmente una plantilla para crear objetos
instancias de clases que obtienen sus variables y funciones desde una clase.
Las clases son esencialmente una plantilla para crear objetos.

Una clase básica se ve como sigue:

Expand All @@ -18,10 +18,10 @@ Una clase básica se ve como sigue:
print("Hola {}".format(self.name))

La función especial "__init__" se llama cuando se crea un objeto Persona.
Pueded definir y asignar variables que se usan dentro del objeto Persona
Se pueden definir y asignar variables que se usan dentro del objeto Persona
creado. Por ejemplo la clase de arriba asigna una nueva variable dentro del
objeto Persona, llamada "name" usando el valor provisto a la función
__init__. El parámetro "self" hace referencia al objeto implícito que se
"__init__". El parámetro "self" hace referencia al objeto implícito que se
está creando. En otros lenguajes de programación el objeto implícito se
denomina "this".

Expand All @@ -30,9 +30,9 @@ función __init__

.. sourcecode:: python

myperson = Person('Alex')
myperson = Persona('Alex')

En la clase Person "print_name" es una función definida por el usuario que
En la clase Persona "print_name" es una función definida por el usuario que
puede ser invocada para realizar cierta tarea. La difrencia entre una
función definida dentro de una clase y otra que no lo está es que las
funciones definidas dentro de clases tienen acceso a las variables
Expand All @@ -42,7 +42,7 @@ Para invocar una función de un objeto se puede utilizar la siguiente sintaxis.

.. sourcecode:: python

alex = Person('Alex')
alex = Persona('Alex')
alex.print_name() # Imprime 'Hola Alex'


Expand All @@ -51,8 +51,8 @@ sintáxis similar:

.. sourcecode:: python

alex = Person('Alex')
john = Person('Johnnie')
alex = Persona('Alex')
john = Persona('Johnnie')
print(alex.name) # Imprime 'Alex'
print(john.name) # Imprime 'Johnnie'
john.name = 'John Walker'
Expand All @@ -62,10 +62,10 @@ sintáxis similar:
Desafío
-------

Considera la clase "Vehicle" que almacena el costo de un Vehículo, y una
Considera la clase "Vehicle" que almacena el costo de un vehículo, y una
función que retorna información acerca del vehículo como una cadena. Escribe
un programa que imprima las líneas "Vehicle cost is 12000" y "Vechicle cost is
5999.99" en ese orden usando la clase Vehicle y la función description
5999.99" en ese orden usando la clase Vehicle y la función description.

.. sourcecode:: python

Expand Down
10 changes: 5 additions & 5 deletions py101/classes/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A basic class would look something like this:
print("Hello {}".format(self.name))

The special "__init__" function is called when a Person object is created.
It can define and assigne variables inside a created Person object. For
It can define and assign variables inside a created Person object. For
example the class above assigns a new variable inside a Person object called
name using the value provided to the __init__ function. The "self" parameter
makes reference to the implicit object which was created. In other
Expand All @@ -31,10 +31,10 @@ __init__ function.

myperson = Person('Alex')

In the Person class "print_name" is a user defined function that can be
In the Person class, "print_name" is a user defined function that can be
invoked to perform custom behaviour. The difference between a function
defined inside a class an user defined function which not, is that functions
inside classes do have access to the individual variables, those variables
defined inside a class and a function defined outside a class is that functions
inside classes have access to the individual variables, those variables
are referenced by accessing the self object.

To invoke a function from an object, the following syntax can be used:
Expand All @@ -61,7 +61,7 @@ Challenge
---------

Consider a class called "Vehicle" that stores a Vehicle cost, and a
function that returns information about the vehicle as an string. Write a
function that returns information about the vehicle as a string. Write a
program that prints the lines "Vechicle cost is 12000" and "Vechicle cost is
5999.99" in that order using the Vehicle class and the description function

Expand Down
6 changes: 3 additions & 3 deletions py101/conditions/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Decision making
---------------

Decision making is anticipation of conditions occurring while execution of the program and specifying actions taken according to the conditions. Decision structures evaluate multiple expressions which produce True or False. The program determine which action to take and which statements to execute, depending of the value of the expressions. Following is an example of a typical decision making structure found in most of the programming languages:
Decision making is anticipation of conditions occurring while execution of the program and specifying actions taken according to the conditions. Decision structures evaluate multiple expressions which produce True or False. The program determines which action to take and which statements to execute, depending of the value of the expressions. Following is an example of a typical decision making structure found in most programming languages:

.. sourcecode:: python

Expand All @@ -10,7 +10,7 @@ Decision making is anticipation of conditions occurring while execution of the p
if age > 18:
print('You are too old')

Python provides the "if" statements, consisting of a boolean expression followed by one or more statementsIf statements can be followed by an else "else" statements executed if the top "if" condition doesn't held.
Python provides the "if" statement, consisting of a boolean expression followed by one or more statements. "If" statements can be followed by an "else" statement executed if the top "if" condition doesn't held.

.. sourcecode:: python

Expand All @@ -22,7 +22,7 @@ Python provides the "if" statements, consisting of a boolean expression followed
else:
print('Result is {}'.format(x/y))

If statements can be nested allowing more complex logic to be executed:
"If" statements can be nested allowing more complex logic to be executed:

.. sourcecode:: python

Expand Down
12 changes: 5 additions & 7 deletions py101/dictionaries/README.es.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Diccionarios
------------

Un diccionario es un tipo de datos similar a las listas, pero funciona
asociando claves y valores en en vez de usar índices. Cada valor del
asociando claves y valores en vez de usar índices. Cada valor del
diccionario puede ser accedido usando una clave que puede ser cualquier tipo
de objeto. Por ejemplo se pueden usar cadenas para referenciar objetos del
diccionario. Una pequeña base de datos telefónica puede ser almacenada usando
diccionarios de la siguiente manera
diccionarios de la siguiente manera.

.. sourcecode:: python

Expand All @@ -16,7 +16,7 @@ diccionario puede ser accedido usando una clave que puede ser cualquier tipo
directorio["Rolling"] = '9476-62781'

De manera alternativa, un diccionario puede ser inicializado usando la
siguiente notación
siguiente notación:

.. sourcecode:: python

Expand All @@ -30,7 +30,7 @@ Iteración
---------

Los diccionarios permiten ser iterados. Para iterar sobre las claves del
diccionario se usa la siguiente sintaxis.
diccionario se usa la siguiente sintaxis:

.. sourcecode:: python

Expand All @@ -51,7 +51,7 @@ Sin embargo, un diccionario no mantiene el orden de los elementos almacenado
Borrado de claves
-----------------

Para borrar un índice específico usa la palabra clave "del" como se muestra
Para borrar una clave específica usa la palabra clave "del" como se muestra
en el siguiente ejemplo:

.. sourcecode:: python
Expand Down Expand Up @@ -81,5 +81,3 @@ cuyos valores son números pares.
# no modifiques este código
print_only_even_keys({ 'Alfred': 28, 'Mary': 29 })
print_only_even_keys({ 'Alfred': 31, 'Mary': 29 })


8 changes: 4 additions & 4 deletions py101/dictionaries/README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Dictonaries
-----------

A dictionary is a data type similar to lists, but works with keys and
A dictionary is a data type similar to lists, but it works with keys and
values instead of indexes. Each value stored in a dictionary can be accessed
using a key, which is any type of object, for example strings
instead of using its index to address it.
using a key, which can any type of object (for example strings),
instead of using a numerical index as lists do.

For example, a database of phone numbers could be stored using a dictionary
like this: {}
Expand Down Expand Up @@ -81,4 +81,4 @@ Modify the program below, so the "print_only_even_keys" function prints
print_only_even_keys({ 'Alfred': 28, 'Mary': 29 })
print_only_even_keys({ 'Alfred': 31, 'María': 29 })

The program should Output "Alfred" in the first line and nothing else
The program should Output "Alfred" in the first line and nothing else.
2 changes: 1 addition & 1 deletion py101/formatting/README.es.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Formateo de Strings
-------------------

El método str.format() de la clase string puede ser utilizado para hacer substitución de variables y formateo de valores. Esto permite concatenar elementos juntos dentro de una cadena usando formateo posicional. Funciona introduciendo uno o más campos de reemplazo, definidos como pares de corchetes ({}) en uan cadena y llamando a la operación format:
El método str.format() de la clase string puede ser utilizado para hacer substitución de variables y formateo de valores. Esto permite concatenar elementos juntos dentro de una cadena usando formateo posicional. Funciona introduciendo uno o más campos de reemplazo, definidos como pares de corchetes ({}) en una cadena y llamando a la operación format:

.. sourcecode:: python

Expand Down
4 changes: 2 additions & 2 deletions py101/formatting/README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
String Formatting
-----------------

Python's format() operation of the string class allows to do variable substitutions and value formatting. This allows to concatenate elements together within a string through positional formatting. It work by putting in one or more replacement fields or placeholders, defined by a pair of curly braces ({}), into a string and calling the format() operation:
Python's format() operation of the string class allows to do variable substitutions and value formatting. This allows to concatenate elements together within a string through positional formatting. It works by putting in one or more replacement fields or placeholders, defined by a pair of curly braces ({}), into a string and calling the format() operation:

.. sourcecode:: python

print('Hello {}. How are you?'.format('Josh'))
# prints out 'Hello Josh. How are you?

In the previous example places the value of Josh into the string where the curly braces were.
In the previous example it places the value "Josh" into the string where the curly braces were.

Multiple pairs of curly braces can be used to do multiple substitutions.

Expand Down
4 changes: 2 additions & 2 deletions py101/functions/README.es.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Una función es un bloque de código organizado y reusable que puede ser utiliza
print("Hola")
print("¿Cómo estás?")

Las funciones también pueden recibir argumentos: variables que se pasan desde el invocador a la función. Por ejemplo
Las funciones también pueden recibir argumentos: variables que se pasan desde el invocador a la función. Por ejemplo:

.. sourcecode:: python

Expand All @@ -28,7 +28,7 @@ Las funciones también pueden retornar un valor al invocador, usando la palabra
print("y no puede ser 0")
return 0

En algunos casos las funciones pueden ser vacías y no hacer nada. Por ejemplo si se planea ser escritas luego. En esos casos, esas funciones solo tienen la palabra clave "pass" en el cuerpo
En algunos casos las funciones pueden ser vacías y no hacer nada. Por ejemplo si se planea escribirlas luego. En esos casos, esas funciones solo tienen la palabra clave "pass" en el cuerpo.

.. sourcecode:: python

Expand Down
8 changes: 4 additions & 4 deletions py101/functions/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Functions
---------

A function is a block of organized, reusable code that is used to perform a single, related action. Python already define many built-in functions like print() or len(), but new functions can be defined in the code, which are called user-defined functions.
A function is a block of organized, reusable code that is used to perform a single, related action. Python already definea many built-in functions like print() or len(), but new functions can be defined in the code, which are called user-defined functions.

.. sourcecode:: python

Expand All @@ -17,7 +17,7 @@ Functions may also receive arguments (variables passed from the caller to the fu
print("Hello {}".format(name))
print("How are you?")

Also they may return a value to the caller, using "return" keyword. For example:
Also they may return a value to the caller, using the "return" keyword. For example:

.. sourcecode:: python

Expand All @@ -28,7 +28,7 @@ Also they may return a value to the caller, using "return" keyword. For example:
print("y can't be zero")
return 0

In rare cases some functions may be empty and do nothing. For example if they are planned to be written later. In those cases, those functions have only the "pass" keyword on the body:
In rare cases some functions may be empty and do nothing. For example if they are planned to be written later. In those cases, those functions have only the "pass" keyword on the body:

.. sourcecode:: python

Expand All @@ -39,7 +39,7 @@ In rare cases some functions may be empty and do nothing. For example if they ar
Calling a Function
------------------

Defining a function only gives it a name, specifies the parameters that are to be included in the function and structures the blocks of code. Once the basic structure of a function is finalized, it can be executed by calling it. Following is the example to call the previous defined functions:
Defining a function only gives it a name, specifies the parameters that are to be included in the function and structures the blocks of code. Once the basic structure of a function is finalized, it can be executed by calling it. Following is the example to call the previously defined functions:

.. sourcecode:: python

Expand Down
4 changes: 2 additions & 2 deletions py101/lists/README.es.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Lists
-----

Python es único en la manera en la que maneja secuencias y otros objetos. Un tipo de dato usado para manejar secuencias es el tipo "list". El siguiente ejemplo muestra como crear una lista con cuatro elementos
Python es único en la manera en la que maneja secuencias y otros objetos. Un tipo de dato usado para manejar secuencias es el tipo "list". El siguiente ejemplo muestra como crear tres listas con cuatro elementos.

.. sourcecode:: python

my_list = [ "nasa", 1958, "Moon", 1969 ];
ingredients = [ "tomato", "bread", "cheese", "ham" ]
quantities = [ 1, 2, 3, 4 ]

Los objetos de una lista son referenciados por índice. El primer índice es 0, que almacena el primer elemento, el segundo es uno, y así sucesivamente. Para obtener los valores en listas se debe usar las llaves "[]" para obtener el valor en ese índice:
Los objetos de una lista son referenciados por índice. El primer índice es 0, que almacena el primer elemento, el segundo es 1, y así sucesivamente. Para obtener los valores en listas se debe usar las llaves "[]" junto con el índice índice:

.. sourcecode:: python

Expand Down
2 changes: 1 addition & 1 deletion py101/lists/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Lists
-----

Python is unique in the way it can handle sequences of other objects. One type used to handle sequences is the "list". The following example creates a list with four elements.
Python is unique in the way it can handle sequences of other objects. One type used to handle sequences is the "list". The following examples create lists with four elements.

.. sourcecode:: python

Expand Down
13 changes: 8 additions & 5 deletions py101/loops/README.es.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Bucles While
------------

En general las sentencias son ejecutadas secuencialmente: la primera sentencia es ejecutada el princio, seguida por la segunda, y así sucesivamente. En algunas situaciones es necesario ejecutar un bloque de código varias veces. El siguiente ejemplo imprimer los números del 1 al 100 y luego "Terminado"
En general las sentencias son ejecutadas secuencialmente: la primera sentencia es ejecutada el princio, seguida por la segunda, y así sucesivamente. En algunas situaciones es necesario ejecutar un bloque de código varias veces. El siguiente ejemplo imprime los números del 1 al 100 y luego "Terminado"

.. sourcecode:: python

Expand All @@ -13,12 +13,15 @@ En general las sentencias son ejecutadas secuencialmente: la primera sentencia e

Los lenguages de programación proveen varias estructuras de control que permiten flujos de control más complejos, entre los que se encuentran los búcles "while" y "for".

Los bucles while, ejecutan las sentencias dentro de él siempre y cuando cierta condición se cumpla. Cuando la condición deja de cumplirse el flujo pasa a la línea exactamente luego del bucle.
Bucles while
------------

Los bucles "while" ejecutan las sentencias dentro de él siempre y cuando cierta condición se cumpla. Cuando la condición deja de cumplirse el flujo pasa a la línea exactamente debajo del bucle.

Bucles for
----------

Los bucles for tienen la habilidad de iterar sobre los items de cualquier secuencia, ya sea lista o cadena de caracteres.
Los bucles "for" tienen la habilidad de iterar sobre los items de cualquier secuencia, ya sea lista o cadena de caracteres.

.. sourcecode:: python
ingredients = ['banana', 'manzana', 'mango']
Expand All @@ -41,7 +44,7 @@ The previous example will generate the following output:
o
n

La función "range" puede ser usada para iterar sobre una lista de números
La función "range" puede ser usada para iterar sobre una lista de números.

.. sourcecode:: python
for number in range(100):
Expand All @@ -51,4 +54,4 @@ La función "range" puede ser usada para iterar sobre una lista de números
Desafío
-------

Usando sentencias while for e if, escribe un programa que imprima todos los números impares del 1 al 100, uno por línea.
Usando sentencias "while", "for" e "if", escribe un programa que imprima todos los números impares del 1 al 100, uno por línea.
Loading

0 comments on commit f27028e

Please sign in to comment.