diff --git a/exercises/021-integral/README.es.md b/exercises/021-integral/README.es.md new file mode 100644 index 00000000..803f02b7 --- /dev/null +++ b/exercises/021-integral/README.es.md @@ -0,0 +1,22 @@ +# `021` integral + +## 📝 Instrucciones: + +1. Dado un número entero `n`, escribe una función `generate_dict()` que genera un diccionario que contiene `(i, i*i)` como un número entero entre 1 y n (ambos incluidos). + +2. `generate_dict()` debe luego imprimir el diccionario. + +## Ejemplo de entrada: + +```py +generate_dict(8) +``` +## Ejemplo de salida: + ++ {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64} + +## 💡 Pistas: + ++ En el caso de que se le pasen datos a la cuestión, deben asumirse como entradas de la consola. + ++ Considera usar `dict()`. diff --git a/exercises/021-integral/README.md b/exercises/021-integral/README.md new file mode 100644 index 00000000..6b496fac --- /dev/null +++ b/exercises/021-integral/README.md @@ -0,0 +1,23 @@ +# `021` integral + +## 📝 Instructions: + +1. With a given integral number `n`, write a function `generate_dict` that generates a dictionary that contains `(i, i*i)` that is an integral number between 1 and n (both included). + +2. `generate_dict` should then print the dictionary. + +## Example input: + +```py +generate_dict(8) +``` + +## Example output: + ++ {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64} + +## 💡 Hints: + ++ In case of input data being supplied to the question, it should be assumed to be a console input. + ++ Consider use `dict()` \ No newline at end of file diff --git a/exercises/22-Integral/app.py b/exercises/021-integral/app.py similarity index 100% rename from exercises/22-Integral/app.py rename to exercises/021-integral/app.py diff --git a/exercises/22-Integral/solution.hide.py b/exercises/021-integral/solution.hide.py similarity index 100% rename from exercises/22-Integral/solution.hide.py rename to exercises/021-integral/solution.hide.py diff --git a/exercises/022-list_and_tuple/README.es.md b/exercises/022-list_and_tuple/README.es.md new file mode 100644 index 00000000..cea3d8df --- /dev/null +++ b/exercises/022-list_and_tuple/README.es.md @@ -0,0 +1,25 @@ +# `022` list and tuple + +## 📝 Instrucciones: + +1. Escribe una función `list_tuple()` que acepte una secuencia de números separados por comas como parámetro en un string y genere una lista y una tupla que contenga todos los números. + +## Ejemplo de entrada: + +```py +list_tuple("34,67,55,33,12,98") +``` + +## Ejemplo de salida: + +```bash +['34', '67', '55', '33', '12', '98'] +``` +o +```bash +('34', '67', '55', '33', '12', '98') +``` + +## 💡 Pistas: + ++ Usa el método `tuple()` para convertir la lista en una tupla. diff --git a/exercises/022-list_and_tuple/README.md b/exercises/022-list_and_tuple/README.md new file mode 100644 index 00000000..56d0b5b4 --- /dev/null +++ b/exercises/022-list_and_tuple/README.md @@ -0,0 +1,27 @@ +# `022` list and tuple + +## 📝 Instructions: + +1. Write a function `list_tuple()` which accepts a sequence of comma-separated numbers in a string as parameter and generate a list or a tuple which contains every number. + +## Example input: + +```py +list_tuple(34,67,55,33,12,98) +``` + +## Example output: + +```bash +['34', '67', '55', '33', '12', '98'] +``` + +or + +```bash +('34', '67', '55', '33', '12', '98') +``` + +## 💡 Hints: + ++ `tuple()` method may be used to convert the list into a tuple diff --git a/exercises/23-list-and-tuple/app.py b/exercises/022-list_and_tuple/app.py similarity index 100% rename from exercises/23-list-and-tuple/app.py rename to exercises/022-list_and_tuple/app.py diff --git a/exercises/23-list-and-tuple/solution.hide.py b/exercises/022-list_and_tuple/solution.hide.py similarity index 100% rename from exercises/23-list-and-tuple/solution.hide.py rename to exercises/022-list_and_tuple/solution.hide.py diff --git a/exercises/023-class-with-two-methods/README.es.md b/exercises/023-class-with-two-methods/README.es.md new file mode 100644 index 00000000..f9050a61 --- /dev/null +++ b/exercises/023-class-with-two-methods/README.es.md @@ -0,0 +1,15 @@ +# `023` class with two methods + +## 📝 Instrucciones: + +1. Define una clase que tenga al menos dos métodos: + +- `get_string`: obtener un string desde la entrada de la consola. + +- `print_string`: imprimir el string en mayúscula. + +2. Por favor incluye una función de prueba simple para probar los métodos de la clase. + +## 💡 Pistas: + ++ Usa el método __init__ para construir algunos parámetros. \ No newline at end of file diff --git a/exercises/023-class-with-two-methods/README.md b/exercises/023-class-with-two-methods/README.md new file mode 100644 index 00000000..4bd03e93 --- /dev/null +++ b/exercises/023-class-with-two-methods/README.md @@ -0,0 +1,15 @@ +# `24` class with two methods + +## 📝 Instructions: + +1. Define a class which has at least two methods: + +- `get_string`: to get a string from console input + +- `print_string`: to print the string in upper case. + +2. Please include simple test function to test the class methods. + +## 💡 Hint: + ++ Use __init__ method to construct some parameters \ No newline at end of file diff --git a/exercises/24-class-with-two-methods/app.py b/exercises/023-class-with-two-methods/app.py similarity index 100% rename from exercises/24-class-with-two-methods/app.py rename to exercises/023-class-with-two-methods/app.py diff --git a/exercises/023-class-with-two-methods/solution.hide.py b/exercises/023-class-with-two-methods/solution.hide.py new file mode 100644 index 00000000..bda4169b --- /dev/null +++ b/exercises/023-class-with-two-methods/solution.hide.py @@ -0,0 +1,13 @@ +class input_out_string(object): + def __init__(self): + self.s = "" + + def get_String(self): + self.s = raw_input() + + def print_String(self): + print self.s.upper() + +str_obj = input_out_string() +str_obj.get_string() +str_obj.print_String() \ No newline at end of file diff --git a/exercises/024-print_formula/README.es.md b/exercises/024-print_formula/README.es.md new file mode 100644 index 00000000..c77f5c7d --- /dev/null +++ b/exercises/024-print_formula/README.es.md @@ -0,0 +1,22 @@ +# `024` print_formula + +## 📝 Instrucciones: + +1. Escribe una función `print_formula()` que calcule e imprima el valor de acuerdo a la fórmula dada: `Q = Square root of [(2 * C * D)/H]`. El valor fijo de `C` es 50 y el `H` es 30. `D` es la variable cuyos valores deben ser ingresados como parámetros en la función. + +## Ejemplo de entrada: + +```py +print_formula(100,150,180) +``` + +## Ejemplo de salida: + ++ 18,22,24 + +## 💡 Pistas: + ++ Si el resultado retornado es un decimal, debería rendondearse a su valor más cercano (por ejemplo, si el resultado es `26.0`, debería imprimirse como `26`) + ++ En el caso de que se le hayan entregado datos a la cuestión, deben asumirse como una entrada de la consola. + diff --git a/exercises/024-print_formula/README.md b/exercises/024-print_formula/README.md new file mode 100644 index 00000000..d394c829 --- /dev/null +++ b/exercises/024-print_formula/README.md @@ -0,0 +1,21 @@ +# `024` print formula + +## 📝 Instructions: + +1. Write a function `print_formula()` that calculates and prints the value according to the given formula: `Q = Square root of [(2 * C * D)/H]`. The fixed value of `C` is 50 and and the fixed value of `H` is 30. `D` is the variable whose values should be assigned through the parameters. + +## Example input: + +```py +print_formula(100,150,180) +``` + +## Example output: + ++ 18,22,24 + +## 💡 Hints: + ++ If the output received is in decimal form, it should be rounded off to its nearest value (for example, if the output received is `26.0`, it should be printed as `26`). + ++ In case of input data being supplied to the question, it should be assumed to be a console input. diff --git a/exercises/25-print-formula/app.py b/exercises/024-print_formula/app.py similarity index 100% rename from exercises/25-print-formula/app.py rename to exercises/024-print_formula/app.py diff --git a/exercises/25-print-formula/solution.hide.py b/exercises/024-print_formula/solution.hide.py similarity index 100% rename from exercises/25-print-formula/solution.hide.py rename to exercises/024-print_formula/solution.hide.py diff --git a/exercises/025-two_dimensional_array/README.es.md b/exercises/025-two_dimensional_array/README.es.md new file mode 100644 index 00000000..85407eba --- /dev/null +++ b/exercises/025-two_dimensional_array/README.es.md @@ -0,0 +1,22 @@ +# `025` two dimensional array + +## 📝 Instrucciones: + +1. Escribe una función `two_dimensional_array()` que reciba dos dígitos `X,Y` como entrada y retorne un array de dos dimensiones. El valor del elemento en la fila i-th y en la columna j-th del array debe ser `i*j`. + +## Ejemplo de Entrada: + +```py +two_dimensional_array(3,5) +``` + +## Ejemplo de Salida: + ++ [[0, 0, 0, 0, 0], [0, 1, 2, 3, 4], [0, 2, 4, 6, 8]] + + ## 💡 Pistas: + ++ i = 0,1.., X-1; j = 0,1, ­Y-1. + ++ En el caso de que se le entreguen datos a la cuestión, debe asumirse como una entrada de la consola en un formulario separado por comas. + diff --git a/exercises/025-two_dimensional_array/README.md b/exercises/025-two_dimensional_array/README.md new file mode 100644 index 00000000..64d13b65 --- /dev/null +++ b/exercises/025-two_dimensional_array/README.md @@ -0,0 +1,21 @@ +# `025` two dimensional array + +## 📝 Instructions: + +1. Create a function `two_dimensional_array()` which takes 2 digits, X,Y as input and generates a 2-dimensional array. The element value in the i-th row and j-th column of the array should be `i*j`. + +## Example input: + +```py +two_dimensional_array(3,5) +``` + +## Example output: + ++ [[0, 0, 0, 0, 0], [0, 1, 2, 3, 4], [0, 2, 4, 6, 8]] + +## 💡 Hints: + ++ i = 0,1.., X-1; j= 0,1, Y-1. + ++ In case of input data being supplied to the question, it should be assumed to be a console input in a comma-separated form. \ No newline at end of file diff --git a/exercises/26-two-dimensional-array/app.py b/exercises/025-two_dimensional_array/app.py similarity index 100% rename from exercises/26-two-dimensional-array/app.py rename to exercises/025-two_dimensional_array/app.py diff --git a/exercises/26-two-dimensional-array/solution.hide.py b/exercises/025-two_dimensional_array/solution.hide.py similarity index 100% rename from exercises/26-two-dimensional-array/solution.hide.py rename to exercises/025-two_dimensional_array/solution.hide.py diff --git a/exercises/026-sequence_of_words/README.es.md b/exercises/026-sequence_of_words/README.es.md new file mode 100644 index 00000000..68e7bba6 --- /dev/null +++ b/exercises/026-sequence_of_words/README.es.md @@ -0,0 +1,18 @@ +# `026` sequence of words + +## 📝 Instrucciones: + +1. Escribe una función `sequence_of_words()`. que reciba una lista de palabras y las retorne en un string separadas por comas después de ordenarlas alfabéticamente. + +## Ejemplo de entrada: + +```py +sequence_of_words("without","hello","bag","world") +``` +## Ejemplo de salida: + ++ "bag,hello,without,world" + +## 💡 Pistas: + ++ En el caso de que se le pasen datos a la cuestión, deben considerarse como entradas de la consola. diff --git a/exercises/026-sequence_of_words/README.md b/exercises/026-sequence_of_words/README.md new file mode 100644 index 00000000..9371a102 --- /dev/null +++ b/exercises/026-sequence_of_words/README.md @@ -0,0 +1,19 @@ +# `026` sequence of words + +## 📝 Instructions: + +1. Write a function `sequence_of_words()` that accepts a comma separated sequence of words as input and prints the words in a comma-separated sequence after sorting them alphabetically. + +## Example input: + +```py +sequence_of_words("without", "hello", "bag", "world") +``` + +## Example output: + +"bag,hello,without,world" + +## 💡 Hints: + ++ In case of input data being supplied to the question, it should be assumed to be a console input. diff --git a/exercises/27-sequence-of-words/app.py b/exercises/026-sequence_of_words/app.py similarity index 100% rename from exercises/27-sequence-of-words/app.py rename to exercises/026-sequence_of_words/app.py diff --git a/exercises/27-sequence-of-words/solution.hide.py b/exercises/026-sequence_of_words/solution.hide.py similarity index 100% rename from exercises/27-sequence-of-words/solution.hide.py rename to exercises/026-sequence_of_words/solution.hide.py diff --git a/exercises/027-sequence_of_lines/README.es.md b/exercises/027-sequence_of_lines/README.es.md new file mode 100644 index 00000000..21bec1f5 --- /dev/null +++ b/exercises/027-sequence_of_lines/README.es.md @@ -0,0 +1,28 @@ +# `027` sequence of lines + +## 📝 Instrucciones: + +1. Escribe una función `lines()` que acepte un string como parámetro y convierta todos los caracteres en mayúscula. + +## Ejemplo de entrada 1: + +```py +lines("Hello world") +``` + +## Ejemplo de salida 1: + ++ "HELLO WORLD" + +## Ejemplo de entrada 2: + +```py +lines("Practice makes perfect") +``` +## Ejemplo de salida: + ++ "PRACTICE MAKES PERFECT" + +## 💡 Pista: + ++ En caso de que se le pasen entradas de datos a la cuestión, deben asumirse como entradas de la consola. diff --git a/exercises/027-sequence_of_lines/README.md b/exercises/027-sequence_of_lines/README.md new file mode 100644 index 00000000..23522a59 --- /dev/null +++ b/exercises/027-sequence_of_lines/README.md @@ -0,0 +1,28 @@ +# `027` sequence of lines + +## 📝 Instructions: + +1. Write a function `lines()` that accepts a string as parameter and returns the string after making all the characters in the sentence capitalized. + +## Example input 1: + + ```py + lines("Hello world") + ``` + +## Example output 1: + ++ "HELLO WORLD" + +## Example input 2: + +lines("Practice makes perfect") + +## Example output 2: + ++ "PRACTICE MAKES PERFECT" + +## 💡 Hint: + ++ In case of input data being supplied to the question, it should be assumed to be a console input. + diff --git a/exercises/28-sequence-of-lines/app.py b/exercises/027-sequence_of_lines/app.py similarity index 100% rename from exercises/28-sequence-of-lines/app.py rename to exercises/027-sequence_of_lines/app.py diff --git a/exercises/28-sequence-of-lines/solution.hide.py b/exercises/027-sequence_of_lines/solution.hide.py similarity index 100% rename from exercises/28-sequence-of-lines/solution.hide.py rename to exercises/027-sequence_of_lines/solution.hide.py diff --git a/exercises/028-remove_duplicate_words/README.es.md b/exercises/028-remove_duplicate_words/README.es.md new file mode 100644 index 00000000..c2132375 --- /dev/null +++ b/exercises/028-remove_duplicate_words/README.es.md @@ -0,0 +1,23 @@ +# `028` remove duplicate words + +## 📝 Instrucciones: + +1. Escribe una función `remove_duplicate_words()` que reciba un string como entrada y que imprima luego las palabras eliminando todas las duplicadas y ordenándolas alfanuméricamente. + +## Ejemplo de entrada: + +```py +remove_duplicate_words("hello world and practice makes perfect and hello world again") +``` + +## Ejemplo de salida: + ++ "again and hello makes perfect practice world" + +## 💡 Pistas: + ++ En caso de que se le entregue entradas de datos a la pregunta, debe asumirse como entrada de la consola. + ++ Usa `set container` para eliminar los datos duplicados automáticamente y luego usa sorted() para ordenar los datos. + + diff --git a/exercises/028-remove_duplicate_words/README.md b/exercises/028-remove_duplicate_words/README.md new file mode 100644 index 00000000..45324919 --- /dev/null +++ b/exercises/028-remove_duplicate_words/README.md @@ -0,0 +1,19 @@ +# `028` remove duplicate words + +## 📝 Instructions: + +1. Write a function `remove_duplicate_words()` that receives a string as parameter and returns the words after removing all duplicate words and sorting them alphanumerically. + +## Example input: + +```py +remove_duplicate_words("hello world and practice makes perfect and hello world again") +``` + +## Example output: + ++ "again and hello makes perfect practice world" + +## 💡 Hints: + ++ We use set container to remove duplicated data automatically and then use sorted() to sort the data. diff --git a/exercises/29-remove-duplicate-words/app.py b/exercises/028-remove_duplicate_words/app.py similarity index 100% rename from exercises/29-remove-duplicate-words/app.py rename to exercises/028-remove_duplicate_words/app.py diff --git a/exercises/29-remove-duplicate-words/solution.hide.py b/exercises/028-remove_duplicate_words/solution.hide.py similarity index 100% rename from exercises/29-remove-duplicate-words/solution.hide.py rename to exercises/028-remove_duplicate_words/solution.hide.py diff --git a/exercises/029-divisible_binary/README.es.md b/exercises/029-divisible_binary/README.es.md new file mode 100644 index 00000000..66cf53e3 --- /dev/null +++ b/exercises/029-divisible_binary/README.es.md @@ -0,0 +1,21 @@ +# `029` divisible binary + +## 📝 Instrucciones: + +1. Escribe una función `divisible_binary()` que acepte una secuencia de números binarios de 4 dígitos separados por comas como su entrada y que luego verifique si son divisibles por 5 o no. Los números que son divisibles por 5 se deben imprimir en una secuencia separada por comas. + +## Ejemplo de entrada: + +```py +divisable_binary(0100,0011,1010,1001) +``` + +## Ejemplo de salida: + ++ 1010 + +## 💡 Pistas: + ++ Supón que los datos se ingresan por la consola. + ++ En caso de que se proporcionen datos de entrada a la cuestión, se debe suponer que se trata de una entrada de consola. \ No newline at end of file diff --git a/exercises/029-divisible_binary/README.md b/exercises/029-divisible_binary/README.md new file mode 100644 index 00000000..2457633b --- /dev/null +++ b/exercises/029-divisible_binary/README.md @@ -0,0 +1,21 @@ +# `029` divisible binary + +## 📝 Instructions: + +1. Write a function `divisible_binary()` that accepts a sequence of comma separated 4 digit binary numbers as its input and then check whether they are divisible by 5 or not. The numbers that are divisible by 5 are to be printed in a comma separated sequence. + +## Example input: + +```py +divisable_binary(0100,0011,1010,1001) +``` + +## Example output: + ++ 1010 + +## 💡 Hints: + ++ Assume the data is input by console. + ++ In case of input data being supplied to the question, it should be assumed to be a console input. \ No newline at end of file diff --git a/exercises/30-divisable-binary/app.py b/exercises/029-divisible_binary/app.py similarity index 100% rename from exercises/30-divisable-binary/app.py rename to exercises/029-divisible_binary/app.py diff --git a/exercises/30-divisable-binary/solution.hide.py b/exercises/029-divisible_binary/solution.hide.py similarity index 100% rename from exercises/30-divisable-binary/solution.hide.py rename to exercises/029-divisible_binary/solution.hide.py diff --git a/exercises/030-even_digits/README.es.md b/exercises/030-even_digits/README.es.md new file mode 100644 index 00000000..0cff0ab2 --- /dev/null +++ b/exercises/030-even_digits/README.es.md @@ -0,0 +1,9 @@ +# `030` even digits + +## 📝 Instrucciones: + +1. Escribe una función `even_digits()` que encuentre todos los números entre 1000 y 3000 (ambos incluidos) en los cuales cada dígito del número sea un número par. *Los números obtenidos deben imprimirse en una secuencia separada por comas en una sola línea.* + +## 💡 Hint: + ++ En caso de que se proporcionen datos de entrada a la pregunta, se debe suponer que se trata de una entrada de consola. diff --git a/exercises/030-even_digits/README.md b/exercises/030-even_digits/README.md new file mode 100644 index 00000000..62550e21 --- /dev/null +++ b/exercises/030-even_digits/README.md @@ -0,0 +1,11 @@ +# `030` even digits + +## 📝 Instructions: + +1. Write a function `even_digits()` which will find all such numbers between 1000 and 3000 (both included) such that each digit of the number is an even number. *The numbers obtained should be printed in a comma-separated sequence on a single line.* + +## 💡 Hint: + ++ In case of input data being supplied to the question, it should be assumed to be a console input. + + diff --git a/exercises/31-sum-eigth-digit/app.py b/exercises/030-even_digits/app.py similarity index 100% rename from exercises/31-sum-eigth-digit/app.py rename to exercises/030-even_digits/app.py diff --git a/exercises/31-sum-eigth-digit/solution.hide.py b/exercises/030-even_digits/solution.hide.py similarity index 100% rename from exercises/31-sum-eigth-digit/solution.hide.py rename to exercises/030-even_digits/solution.hide.py diff --git a/exercises/22-Integral/README.es.md b/exercises/22-Integral/README.es.md deleted file mode 100644 index 5172b806..00000000 --- a/exercises/22-Integral/README.es.md +++ /dev/null @@ -1,11 +0,0 @@ -# `22` Integral - -Dado un número integral n, escribe un programa para generar un diccionario que contenga (i, i*i) como un número integrak entre 1 y n (ambos incluidos). Luego el programa debiese imprimir el diccionario. -Supongamos que se le entrega la siguiente entrada al programa: -8 -El resultado debiese ser: -{1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64} - -Pistas: -En el caso de que se le entreguen datos a la pregunta, deben asumirse como entradas de la consola. -Considera usar dict() diff --git a/exercises/22-Integral/README.md b/exercises/22-Integral/README.md deleted file mode 100644 index 515fbf6a..00000000 --- a/exercises/22-Integral/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# `22` Integral - -With a given integral number n, write a program to generate a dictionary that contains (i, i*i) such that is an integral number between 1 and n (both included). Then the program should print the dictionary. -Suppose the following input is supplied to the program: -8 -Then, the output should be: -{1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64} - -Hints: -In case of input data being supplied to the question, it should be assumed to be a console input. -Consider use dict() \ No newline at end of file diff --git a/exercises/23-list-and-tuple/README.es.md b/exercises/23-list-and-tuple/README.es.md deleted file mode 100644 index 3b9313cb..00000000 --- a/exercises/23-list-and-tuple/README.es.md +++ /dev/null @@ -1,12 +0,0 @@ -# `23` Lista y tupla - -Escribe un programa que acepte una secuencia de números separados por comas desde la consola y genere una lista y una tupla que contenga todos los números. -Supongamos que se le entrega la siguiente entrada al programa: -34,67,55,33,12,98 -El resultado debiese ser: -['34', '67', '55', '33', '12', '98'] -('34', '67', '55', '33', '12', '98') - -Pistas: -En el caso de que se le entreguen entradas de datos a la pregunta, deben asumirse como entradas de la consola. -Usa el método tuple() para convertir la lista en una tupla. diff --git a/exercises/23-list-and-tuple/README.md b/exercises/23-list-and-tuple/README.md deleted file mode 100644 index 15cbf7b1..00000000 --- a/exercises/23-list-and-tuple/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# `23` List and touple - -Write a program which accepts a sequence of comma-separated numbers from console and generate a list and a tuple which contains every number. -Suppose the following input is supplied to the program: -34,67,55,33,12,98 -Then, the output should be: -['34', '67', '55', '33', '12', '98'] -('34', '67', '55', '33', '12', '98') - -Hints: -In case of input data being supplied to the question, it should be assumed to be a console input. -tuple() method can convert list to tuple \ No newline at end of file diff --git a/exercises/24-class-with-two-methods/README.es.md b/exercises/24-class-with-two-methods/README.es.md deleted file mode 100644 index fffb54ba..00000000 --- a/exercises/24-class-with-two-methods/README.es.md +++ /dev/null @@ -1,10 +0,0 @@ -# `24` Una clase con dos métodos - -Define una clase que tenga al menos dos métodos: -Define a class which has at least two methods: -getString: obtener un string desde la entrada de la consola. -printString: imprimir el string en mayúscula. -Por favor incluye una función simple de prueba para probar los métodos de la clase. - -Pistas: -Usa el método __init__ para construir algunos parámetros. \ No newline at end of file diff --git a/exercises/24-class-with-two-methods/README.md b/exercises/24-class-with-two-methods/README.md deleted file mode 100644 index 3971f14f..00000000 --- a/exercises/24-class-with-two-methods/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# `24` Class with two methods - -Define a class which has at least two methods: -getString: to get a string from console input -printString: to print the string in upper case. -Also please include simple test function to test the class methods. - -Hints: -Use __init__ method to construct some parameters \ No newline at end of file diff --git a/exercises/24-class-with-two-methods/solution.hide.py b/exercises/24-class-with-two-methods/solution.hide.py deleted file mode 100644 index b6917e80..00000000 --- a/exercises/24-class-with-two-methods/solution.hide.py +++ /dev/null @@ -1,13 +0,0 @@ -class InputOutString(object): - def __init__(self): - self.s = "" - - def getString(self): - self.s = raw_input() - - def printString(self): - print self.s.upper() - -strObj = InputOutString() -strObj.getString() -strObj.printString() \ No newline at end of file diff --git a/exercises/25-print-formula/README.es.md b/exercises/25-print-formula/README.es.md deleted file mode 100644 index e38c0d3b..00000000 --- a/exercises/25-print-formula/README.es.md +++ /dev/null @@ -1,19 +0,0 @@ -# `25` Imprime la fórmula - -Escribe un programa que calcule e imprima el valor de acuerdo a la fórmula dada: - -Q = Square root of [(2 * C * D)/H] - -A continuación encontrarás los valores fijos de C y H: -C es 50. H es 30. -D es la variable cuyos valores debiesen ser ingresados en tu -Ejemplo: -Digamos que le sentrega la siguiente secuencia separada por coma al programa: -100,150,180 -El resultado del programa debiese ser: -18,22,24 - -Pistas: -Si el resultado recicido es un decimal, debería rendondearse a su valor más cercano (por ejemplo, si el resultado es 26.0, debiese imprimirse como 26) -En el caso de que se le hayan entregado datos a la cuestión, deben asumirse como una entrada de la consola. - \ No newline at end of file diff --git a/exercises/25-print-formula/README.md b/exercises/25-print-formula/README.md deleted file mode 100644 index b47224b0..00000000 --- a/exercises/25-print-formula/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# `25` Print formula - -Write a program that calculates and prints the value according to the given formula: -Q = Square root of [(2 * C * D)/H] - -Following are the fixed values of C and H: -C is 50. H is 30. -D is the variable whose values should be input to your program in a comma-separated sequence. -Example -Let us assume the following comma separated input sequence is given to the program: -100,150,180 -The output of the program should be: -18,22,24 - -Hints: -If the output received is in decimal form, it should be rounded off to its nearest value (for example, if the output received is 26.0, it should be printed as 26) -In case of input data being supplied to the question, it should be assumed to be a console input. \ No newline at end of file diff --git a/exercises/26-two-dimensional-array/README.es.md b/exercises/26-two-dimensional-array/README.es.md deleted file mode 100644 index b81dd4a6..00000000 --- a/exercises/26-two-dimensional-array/README.es.md +++ /dev/null @@ -1,13 +0,0 @@ -# `26` Array de dos dimensiones - -Escribe un progrsms que reciba dos dígitos X,Y como entrada y genere un array de dos dimensiones. El valor del elemento en la fila i-th y en la columna j-th del array debiese ser i*j. -Nota: i=0,1.., X-1; j=0,1,¡­Y-1. -Ejemplo: -Supongamos que se le entregan lasa siguientes entradas al programa: -3,5 -Entonces, el resultado del programa debería ser: -[[0, 0, 0, 0, 0], [0, 1, 2, 3, 4], [0, 2, 4, 6, 8]] - -Pistas: -Nota: En el caso de que se le entreguen datos a la cuestión, debe asumirse como una entrada de la consola en un formulario separado por comas. - diff --git a/exercises/26-two-dimensional-array/README.md b/exercises/26-two-dimensional-array/README.md deleted file mode 100644 index 330f75a5..00000000 --- a/exercises/26-two-dimensional-array/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# `26`Two dimensional array - -Write a program which takes 2 digits, X,Y as input and generates a 2-dimensional array. The element value in the i-th row and j-th column of the array should be i*j. -Note: i=0,1.., X-1; j=0,1,¡­Y-1. -Example -Suppose the following inputs are given to the program: -3,5 -Then, the output of the program should be: -[[0, 0, 0, 0, 0], [0, 1, 2, 3, 4], [0, 2, 4, 6, 8]] - -Hints: -Note: In case of input data being supplied to the question, it should be assumed to be a console input in a comma-separated form. \ No newline at end of file diff --git a/exercises/27-sequence-of-words/README.es.md b/exercises/27-sequence-of-words/README.es.md deleted file mode 100644 index 290fdecf..00000000 --- a/exercises/27-sequence-of-words/README.es.md +++ /dev/null @@ -1,10 +0,0 @@ -# `27` Secuencia de palabras - -Escribe un programa que acepte una secuencia separada por comas como entrada e imprima las palabras en una secuencia separada por comas después de ordenarlas alfabéticamente. -Supongamos que se le entrega la siguiente entrada al programa: -without,hello,bag,world -El resultado debiese ser: -bag,hello,without,world - -Pistas: -En el caso de que se le entreguen datos a la pregunta, deben considerarse como entradas de la consola. diff --git a/exercises/27-sequence-of-words/README.md b/exercises/27-sequence-of-words/README.md deleted file mode 100644 index be2f8cf0..00000000 --- a/exercises/27-sequence-of-words/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# `27`Sequence of words - -Write a program that accepts a comma separated sequence of words as input and prints the words in a comma-separated sequence after sorting them alphabetically. -Suppose the following input is supplied to the program: -without,hello,bag,world -Then, the output should be: -bag,hello,without,world - -Hints: -In case of input data being supplied to the question, it should be assumed to be a console input. \ No newline at end of file diff --git a/exercises/28-sequence-of-lines/README.es.md b/exercises/28-sequence-of-lines/README.es.md deleted file mode 100644 index 50656af2..00000000 --- a/exercises/28-sequence-of-lines/README.es.md +++ /dev/null @@ -1,13 +0,0 @@ -# `28` Sequence of lines - -Escribe un programa que acepte una secuencia de líneas como entrada y que luego imprima las líneas convirtiendo todos los caracteres en mayúscula. - -Supongamos le entregamos la siguiente entrada al programa: -Hello world -Practice makes perfect -El resultado debería ser este: -HELLO WORLD -PRACTICE MAKES PERFECT - -Pistas: -En caso de que se le pasen entradas de datos a la pregunta, deben asumirse como entradas de la consola. diff --git a/exercises/28-sequence-of-lines/README.md b/exercises/28-sequence-of-lines/README.md deleted file mode 100644 index 1efba3f5..00000000 --- a/exercises/28-sequence-of-lines/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# `28` Sequence of lines - -Write a program that accepts sequence of lines as input and prints the lines after making all characters in the sentence capitalized. -Suppose the following input is supplied to the program: -Hello world -Practice makes perfect -Then, the output should be: -HELLO WORLD -PRACTICE MAKES PERFECT - -Hints: -In case of input data being supplied to the question, it should be assumed to be a console input. - -Solution: diff --git a/exercises/29-remove-duplicate-words/README.es.md b/exercises/29-remove-duplicate-words/README.es.md deleted file mode 100644 index 2683b9a2..00000000 --- a/exercises/29-remove-duplicate-words/README.es.md +++ /dev/null @@ -1,18 +0,0 @@ -# `29`Eliminar los duplicados - -Escribe un programa que acepte una secuencia de palabras separadas por espacios en blanco como entrada y que imprima luego las palabras eliminando todas las duplicadas y ordenándolas alfanuméricamente. - -Supongamos que se le entrega la siguiente entrada al programa: - -hello world and practice makes perfect and hello world again - -El resultado debería ser: - -again and hello makes perfect practice world - -Pistas: -En caso de que se le entregue entradas de datos a la pregunta, debe asumirse como entrada de la consola. - -Usa set container para eliminar los datos duplicados automáticamente y luego usa sorted() para ordenar los datos. - - diff --git a/exercises/29-remove-duplicate-words/README.md b/exercises/29-remove-duplicate-words/README.md deleted file mode 100644 index 3909c46a..00000000 --- a/exercises/29-remove-duplicate-words/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# `29` Remove duplicate words - -Write a program that accepts a sequence of whitespace separated words as input and prints the words after removing all duplicate words and sorting them alphanumerically. -Suppose the following input is supplied to the program: -hello world and practice makes perfect and hello world again -Then, the output should be: -again and hello makes perfect practice world - -Hints: -In case of input data being supplied to the question, it should be assumed to be a console input. -We use set container to remove duplicated data automatically and then use sorted() to sort the data. - diff --git a/exercises/30-divisable-binary/README.md b/exercises/30-divisable-binary/README.md deleted file mode 100644 index 66c6463a..00000000 --- a/exercises/30-divisable-binary/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Write a program which accepts a sequence of comma separated 4 digit binary numbers as its input and then check whether they are divisible by 5 or not. The numbers that are divisible by 5 are to be printed in a comma separated sequence. -Example: -0100,0011,1010,1001 -Then the output should be: -1010 -Notes: Assume the data is input by console. - -Hints: -In case of input data being supplied to the question, it should be assumed to be a console input. \ No newline at end of file diff --git a/exercises/31-sum-eigth-digit/README.md b/exercises/31-sum-eigth-digit/README.md deleted file mode 100644 index c89832cb..00000000 --- a/exercises/31-sum-eigth-digit/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Write a program, which will find all such numbers between 1000 and 3000 (both included) such that each digit of the number is an even number. -The numbers obtained should be printed in a comma-separated sequence on a single line. - -Hints: -In case of input data being supplied to the question, it should be assumed to be a console input. - -Solution: