diff --git a/ProposedProblems/Problem3.ipynb b/ProposedProblems/Problem3.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..eb54c5a417a4fa6f087d7e6bbfc1facff981bef1 --- /dev/null +++ b/ProposedProblems/Problem3.ipynb @@ -0,0 +1,51 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[27, 21, 23]\n" + ] + } + ], + "source": [ + "year = [1994, 1999, 1997, 2001, 2000, 1983, 1989, 1998]\n", + "edad = [(2021 - x) for x in year if (x%2 == 0)]\n", + "print (edad)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/ProposedProblems/Problem4.ipynb b/ProposedProblems/Problem4.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..0d4e3235765a7aa92e838ab782ae19e105e66d25 --- /dev/null +++ b/ProposedProblems/Problem4.ipynb @@ -0,0 +1,85 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ingrese un numero515\n", + "1030\n", + "1030\n", + "Ingrese otro número\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "numero1 = input(\"Ingrese un numero\")\n", + "inverse_numero = []\n", + "for i in reversed(numero1):\n", + " inverse_numero.append(i)\n", + " numero2 = \"\".join(inverse_numero)\n", + "suma = int(numero1) + int(numero2)\n", + "print(suma)\n", + "\n", + "inverse_suma = []\n", + "for i in reversed(str(suma)):\n", + " inverse_numero.append(i)\n", + " suma_inv = \"\".join(inverse_numero)\n", + "suma = int(numero1) + int(numero2)\n", + "print(suma)\n", + "\n", + "if suma_inv == str(suma):\n", + " print(\"Proceso fializado\")\n", + "else:\n", + " print(\"Ingrese otro número\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}