From 06007efc2dc9c0879839afcca37b77743c957940 Mon Sep 17 00:00:00 2001 From: Mijael Yerson Sanchez Huamanyauri <sanchezm@jupyterMiLAB> Date: Fri, 12 Feb 2021 18:24:57 -0500 Subject: [PATCH] new file from Jupyterhub --- ProposedProblems/Problem3.ipynb | 51 ++++++++++++++++++++ ProposedProblems/Problem4.ipynb | 85 +++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 ProposedProblems/Problem3.ipynb create mode 100644 ProposedProblems/Problem4.ipynb diff --git a/ProposedProblems/Problem3.ipynb b/ProposedProblems/Problem3.ipynb new file mode 100644 index 0000000..eb54c5a --- /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 0000000..0d4e323 --- /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 +} -- GitLab